fix: 1. App keys, 2. Rotate client secret, 3. API key errors page(s) update#733
fix: 1. App keys, 2. Rotate client secret, 3. API key errors page(s) update#733tamalchowdhury wants to merge 4 commits into
Conversation
WalkthroughThree documentation pages were updated: client secret rotation now requires immediate deactivation of the old secret and adds a paid "Maintain previous secret" option; the app keys guide was rewritten with FAQs on rotation, PKCE, and secret storage; and the API key troubleshooting guide was expanded with refreshed error categories and new code examples and prevention guidance. ChangesAPI Credentials Documentation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying kinde-docs-preview with
|
| Latest commit: |
db1928b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f8325017.kinde-docs-preview.pages.dev |
| Branch Preview URL: | https://tamal-update-trending-pages.kinde-docs-preview.pages.dev |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/content/docs/build/applications/rotate-client-secret.mdx`:
- Line 37: The phrase "Kinde-side application" in the documentation line inside
rotate-client-secret.mdx is awkward and non-standard; replace it with clearer
wording such as "your application in Kinde", "the application configuration in
Kinde", or "the Kinde-hosted application" wherever "Kinde-side application"
appears (e.g., the sentence beginning "To ensure your applications remain
secure...") so the text reads naturally and consistently.
In
`@src/content/docs/manage-your-apis/troubleshoot-api-keys/common-api-key-errors.mdx`:
- Around line 125-136: The token endpoint examples use an incorrect
Authorization header and a single apiKey; update each example (notably the
function getValidToken(apiKey) and the other token-refresh snippets in the
"Token expired" section) to accept clientId and clientSecret parameters instead
of apiKey, remove the Authorization header, and include client_id and
client_secret as URL-encoded form fields in the POST body alongside
grant_type=client_credentials and scope; ensure the Content-Type remains
application/x-www-form-urlencoded and that the body concatenates client_id,
client_secret, grant_type, and scope for the /oauth2/token requests.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 18a33706-f95f-4df1-8cf1-ee8e72e9e70e
📒 Files selected for processing (3)
src/content/docs/build/applications/rotate-client-secret.mdxsrc/content/docs/get-started/connect/getting-app-keys.mdxsrc/content/docs/manage-your-apis/troubleshoot-api-keys/common-api-key-errors.mdx
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/content/docs/manage-your-apis/troubleshoot-api-keys/common-api-key-errors.mdx (1)
309-330: ⚡ Quick winRemove unnecessary
asynckeyword.The
checkLimitmethod doesn't perform any asynchronous operations or await any promises, so theasynckeyword is unnecessary and misleading.♻️ Proposed fix
- async checkLimit(key) { + checkLimit(key) { const now = Date.now(); const windowStart = now - this.window;And update the usage example at line 338:
- if (!(await rateLimiter.checkLimit(apiKey))) { + if (!rateLimiter.checkLimit(apiKey)) { throw new Error("Rate limit exceeded. Please try again later."); }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/content/docs/manage-your-apis/troubleshoot-api-keys/common-api-key-errors.mdx` around lines 309 - 330, The checkLimit method is marked async despite having no awaits; remove the async keyword from the checkLimit declaration (the method that accesses this.requests, windowStart, limit and returns a boolean) and update any example or call sites that use await on checkLimit to call it synchronously or handle the returned boolean directly so callers no longer expect a Promise.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@src/content/docs/manage-your-apis/troubleshoot-api-keys/common-api-key-errors.mdx`:
- Around line 309-330: The checkLimit method is marked async despite having no
awaits; remove the async keyword from the checkLimit declaration (the method
that accesses this.requests, windowStart, limit and returns a boolean) and
update any example or call sites that use await on checkLimit to call it
synchronously or handle the returned boolean directly so callers no longer
expect a Promise.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 46b7a2b3-660e-475e-a4e7-cb75016bf343
📒 Files selected for processing (2)
src/content/docs/build/applications/rotate-client-secret.mdxsrc/content/docs/manage-your-apis/troubleshoot-api-keys/common-api-key-errors.mdx
This PR improves 3 new doc changes. The following pages are updated with better content, instructions, and ai_summary:
Summary by CodeRabbit