fix: update javascript SDK docs to use more up to date getAccessToken method#761
fix: update javascript SDK docs to use more up to date getAccessToken method#761pesickaa wants to merge 4 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe documentation updates JavaScript SDK token retrieval, refresh behavior, session restoration, authentication options, invitations, logout, portal usage, and user-profile API references. Related refresh-token and React SDK guidance now references ChangesJavaScript SDK documentation updates
Estimated code review effort: 3 (Moderate) | ~25 minutes Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/content/docs/developer-tools/sdks/frontend/javascript-sdk.mdx (1)
244-247: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAwkward phrasing in deprecation notice.
"updating to use the latest version of the SDK and using the getAccessToken method" repeats "using" and reads clunky.
✏️ Suggested wording
<Aside title="Deprecation Notice"> - The original getToken method is deprecated, and we recommend updating to use the latest version of - the SDK and using the getAccessToken method + The original getToken method is deprecated. We recommend updating to the latest version of + the SDK and using the getAccessToken method instead. </Aside>🤖 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/developer-tools/sdks/frontend/javascript-sdk.mdx` around lines 244 - 247, The deprecation notice in the JavaScript SDK docs reads awkwardly because it repeats “using” and is clunky. Update the wording in the Aside titled “Deprecation Notice” to clearly say that the original getToken method is deprecated and users should upgrade to the latest SDK version and use getAccessToken instead, keeping the message concise and natural.
🤖 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/developer-tools/sdks/frontend/javascript-sdk.mdx`:
- Around line 244-247: The deprecation notice in the JavaScript SDK docs reads
awkwardly because it repeats “using” and is clunky. Update the wording in the
Aside titled “Deprecation Notice” to clearly say that the original getToken
method is deprecated and users should upgrade to the latest SDK version and use
getAccessToken instead, keeping the message concise and natural.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 3b55f093-cf20-4891-9e6b-5cd780b882d1
📒 Files selected for processing (1)
src/content/docs/developer-tools/sdks/frontend/javascript-sdk.mdx
dtoxvanilla1991
left a comment
There was a problem hiding this comment.
Good work. 2 comments.
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 17253219 | Triggered | JSON Web Token | 5549e63 | src/content/docs/developer-tools/sdks/frontend/javascript-sdk.mdx | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Deploying kinde-docs-preview with
|
| Latest commit: |
d4c2ed4
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c8279d75.kinde-docs-preview.pages.dev |
| Branch Preview URL: | https://fix-update-javascript-docs.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/developer-tools/sdks/frontend/javascript-sdk.mdx`:
- Around line 181-206: Update the Invitations documentation to state that
invitation_code must be explicitly passed to login or register, and remove or
revise the claim that merely landing on a URL containing invitation_code
automatically starts sign-in.
- Around line 825-846: Update the options documentation in the RedirectOptions
section to show the actual RedirectOptions shape used by login, register, and
createOrg, including org_name alongside the supported organization and
invitation fields. Ensure the examples and type declaration consistently
reference RedirectOptions while preserving legacy AuthOptions compatibility
where applicable.
🪄 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: de09642d-6cec-43d5-8ba2-69cbdeb17ed4
📒 Files selected for processing (3)
src/content/docs/build/tokens/refresh-tokens.mdxsrc/content/docs/developer-tools/sdks/frontend/javascript-sdk.mdxsrc/content/docs/developer-tools/sdks/frontend/react-sdk.mdx
Description (required)
The pkce js SDK was recently updated and users were being shown the deprecation notice for the
getTokenmethod which was replaced with agetAccessTokenmethod.Added a deprecation notice aside to explain why people may be seeing a deprecation notice, but happy to remove.
Related issues & labels (optional)
Summary by CodeRabbit
getAccessToken()and clarify its interaction with background refresh and cached tokens.on_session_restore_callbackand improved page-load handling examples.login/register/logout/portal/createOrgexamples).getToken()as deprecated with updated expectations.