Release v2.22.1 - #1181
Conversation
📝 WalkthroughWalkthroughVersion ChangesRelease metadata and site assets
Generated API documentation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 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 install failed: dependency version conflict. Check your lock file or package.json. 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.
Actionable comments posted: 3
🤖 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 `@docs/functions/withAuth0.html`:
- Around line 21-24: Correct the source documentation text for the withAuth0
higher-order component so “f you have multiple” reads “if you have multiple,”
then regenerate docs/functions/withAuth0.html from that source.
In `@docs/interfaces/Auth0ContextInterface.html`:
- Around line 304-306: Remove the stale nonce parameter documentation from the
source JSDoc for getDpopNonce, which accepts only id, then regenerate the
Auth0ContextInterface documentation page.
- Line 236: Update the example under Auth0ContextInterface to call the
documented getAccessTokenWithPopup method instead of getTokenWithPopup,
preserving the existing options and config arguments.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 8ff0b18d-fb2c-4d05-9fcd-ac56265a9c55
⛔ Files ignored due to path filters (2)
CHANGELOG.mdis excluded by!CHANGELOG.mdpackage-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (100)
.versiondocs/assets/hierarchy.jsdocs/assets/highlight.cssdocs/assets/main.jsdocs/assets/navigation.jsdocs/assets/search.jsdocs/assets/style.cssdocs/classes/AuthenticationError.htmldocs/classes/ConnectError.htmldocs/classes/GenericError.htmldocs/classes/InMemoryCache.htmldocs/classes/InvalidConfigurationError.htmldocs/classes/LocalStorageCache.htmldocs/classes/MfaChallengeError.htmldocs/classes/MfaEnrollmentError.htmldocs/classes/MfaEnrollmentFactorsError.htmldocs/classes/MfaError.htmldocs/classes/MfaListAuthenticatorsError.htmldocs/classes/MfaRequiredError.htmldocs/classes/MfaVerifyError.htmldocs/classes/MissingRefreshTokenError.htmldocs/classes/MissingScopesError.htmldocs/classes/MyAccountApiError.htmldocs/classes/OAuthError.htmldocs/classes/PasskeyChallengeError.htmldocs/classes/PasskeyError.htmldocs/classes/PasskeyGetTokenError.htmldocs/classes/PasskeyRegisterError.htmldocs/classes/PopupCancelledError.htmldocs/classes/PopupOpenError.htmldocs/classes/PopupTimeoutError.htmldocs/classes/TimeoutError.htmldocs/classes/UseDpopNonceError.htmldocs/classes/User.htmldocs/enums/ResponseType.htmldocs/functions/Auth0Provider.htmldocs/functions/useAuth0.htmldocs/functions/withAuth0.htmldocs/functions/withAuthenticationRequired.htmldocs/hierarchy.htmldocs/index.htmldocs/interfaces/ActClaim.htmldocs/interfaces/Auth0ContextInterface.htmldocs/interfaces/Authenticator.htmldocs/interfaces/AuthorizationParams.htmldocs/interfaces/ChallengeAuthenticatorParams.htmldocs/interfaces/ChallengeResponse.htmldocs/interfaces/ClientConfiguration.htmldocs/interfaces/EnrollEmailParams.htmldocs/interfaces/EnrollOtpParams.htmldocs/interfaces/EnrollPushParams.htmldocs/interfaces/EnrollSmsParams.htmldocs/interfaces/EnrollVoiceParams.htmldocs/interfaces/EnrollmentFactor.htmldocs/interfaces/Factor.htmldocs/interfaces/GetTokenSilentlyOptions.htmldocs/interfaces/GetTokenWithPopupOptions.htmldocs/interfaces/ICache.htmldocs/interfaces/IdToken.htmldocs/interfaces/LogoutOptions.htmldocs/interfaces/LogoutUrlOptions.htmldocs/interfaces/MfaApiClient.htmldocs/interfaces/MyAccountApiClient.htmldocs/interfaces/PasskeyApiClient.htmldocs/interfaces/PopupConfigOptions.htmldocs/interfaces/PopupLoginOptions.htmldocs/interfaces/RedirectConnectAccountOptions.htmldocs/interfaces/RedirectLoginOptions.htmldocs/interfaces/RevokeRefreshTokenOptions.htmldocs/interfaces/UpdateAuthenticationMethodRequest.htmldocs/interfaces/VerifyParams.htmldocs/interfaces/WithAuth0Props.htmldocs/interfaces/WithAuthenticationRequiredOptions.htmldocs/modules.htmldocs/types/AppState.htmldocs/types/Auth0ProviderOptions.htmldocs/types/Auth0ProviderWithClientOptions.htmldocs/types/Auth0ProviderWithConfigOptions.htmldocs/types/AuthenticationMethod.htmldocs/types/AuthenticationMethodType.htmldocs/types/CacheLocation.htmldocs/types/Cacheable.htmldocs/types/ConnectAccountRedirectResult.htmldocs/types/ConnectedAccount.htmldocs/types/CustomTokenExchangeOptions.htmldocs/types/EnrollParams.htmldocs/types/EnrollmentChallengeOptions.htmldocs/types/EnrollmentChallengeResponse.htmldocs/types/EnrollmentResponse.htmldocs/types/EnrollmentVerifyOptions.htmldocs/types/FetcherConfig.htmldocs/types/InteractiveErrorHandler.htmldocs/types/MfaFactorType.htmldocs/types/PasskeyLoginOptions.htmldocs/types/PasskeySignupOptions.htmldocs/types/RefreshTokenMode.htmldocs/types/TokenEndpointResponse.htmldocs/variables/Auth0Context.htmldocs/variables/RefreshTokenMode.htmlpackage.json
| <p>Wrap your class components in this Higher Order Component to give them access to the Auth0Context.</p> | ||
| <p>Providing a context as the second argument allows you to configure the Auth0Provider the Auth0Context | ||
| should come from f you have multiple within your application.</p> | ||
| </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="withauth0p"><span class="tsd-kind-type-parameter">P</span> <span class="tsd-signature-keyword">extends</span> <a href="../interfaces/WithAuth0Props.html" class="tsd-signature-type tsd-kind-interface">WithAuth0Props</a></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">Component</span>: <span class="tsd-signature-type">ComponentType</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#withauth0p">P</a><span class="tsd-signature-symbol">></span></span></li><li><span><span class="tsd-kind-parameter">context</span>: <span class="tsd-signature-type">Context</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/Auth0ContextInterface.html" class="tsd-signature-type tsd-kind-interface">Auth0ContextInterface</a><span class="tsd-signature-symbol"><</span><a href="../classes/User.html" class="tsd-signature-type tsd-kind-class">User</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = Auth0Context</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">ComponentType</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Omit</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#withauth0p">P</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">"auth0"</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/auth0/auth0-react/blob/4dc455b2a7caf587c8c6629d34bd2dc97974a56e/src/with-auth0.tsx#L29">src/with-auth0.tsx:29</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@auth0/auth0-react</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer></footer><div class="overlay"></div></body></html> | ||
| </div> |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Fix the missing “i” in “if”.
Correct the source documentation text before regenerating this generated HTML page; it currently renders “come from f you have multiple”.
🤖 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 `@docs/functions/withAuth0.html` around lines 21 - 24, Correct the source
documentation text for the withAuth0 higher-order component so “f you have
multiple” reads “if you have multiple,” then regenerate
docs/functions/withAuth0.html from that source.
| <section class="tsd-panel tsd-member"> | ||
| <h3 class="tsd-anchor-link" id="getaccesstokenwithpopup"><span>get<wbr/>Access<wbr/>Token<wbr/>With<wbr/>Popup</span><a href="#getaccesstokenwithpopup" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3> | ||
| <div class="tsd-signature"><span class="tsd-kind-property">getAccessTokenWithPopup</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <a href="GetTokenWithPopupOptions.html" class="tsd-signature-type tsd-kind-interface">GetTokenWithPopupOptions</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">config</span><span class="tsd-signature-symbol">?:</span> <a href="PopupConfigOptions.html" class="tsd-signature-type tsd-kind-interface">PopupConfigOptions</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol">></span></div> | ||
| <div class="tsd-comment tsd-typography"><pre><code class="js"><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">token</span><span class="hl-1"> = </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">getTokenWithPopup</span><span class="hl-1">(</span><span class="hl-5">options</span><span class="hl-1">, </span><span class="hl-5">config</span><span class="hl-1">);</span> |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Use the documented popup method name.
Auth0ContextInterface exposes getAccessTokenWithPopup, but this example calls getTokenWithPopup, which will be undefined when copied.
Proposed fix
- const token = await getTokenWithPopup(options, config);
+ const token = await getAccessTokenWithPopup(options, config);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <div class="tsd-comment tsd-typography"><pre><code class="js"><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">token</span><span class="hl-1"> = </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">getTokenWithPopup</span><span class="hl-1">(</span><span class="hl-5">options</span><span class="hl-1">, </span><span class="hl-5">config</span><span class="hl-1">);</span> | |
| <div class="tsd-comment tsd-typography"><pre><code class="js"><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">token</span><span class="hl-1"> = </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">getAccessTokenWithPopup</span><span class="hl-1">(</span><span class="hl-5">options</span><span class="hl-1">, </span><span class="hl-5">config</span><span class="hl-1">);</span> |
🤖 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 `@docs/interfaces/Auth0ContextInterface.html` at line 236, Update the example
under Auth0ContextInterface to call the documented getAccessTokenWithPopup
method instead of getTokenWithPopup, preserving the existing options and config
arguments.
| <div class="tsd-comment tsd-typography"> | ||
| <div class="tsd-tag-param"> | ||
| <h4 class="tsd-anchor-link" id="param-nonce">Param: nonce<a href="#param-nonce" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>The nonce value.</p> |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Remove the nonexistent nonce parameter from getDpopNonce docs.
The signature accepts only id; move/remove this stale @param nonce documentation in the source JSDoc, then regenerate the page.
🤖 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 `@docs/interfaces/Auth0ContextInterface.html` around lines 304 - 306, Remove
the stale nonce parameter documentation from the source JSDoc for getDpopNonce,
which accepts only id, then regenerate the Auth0ContextInterface documentation
page.
|
Closing in favor of a new PR that correctly bumps the package.json minimum version of @auth0/auth0-spa-js to ^2.24.1, not just the lock file. |
Changed
Summary by CodeRabbit
Release
Documentation