Missing Parameters in AccessToken with CacheMode "off" and Refresh Token Rotation Enabled #772
Open
6 tasks done
Labels
bug
Something isn't working
more info needed
This issue is waiting for more information in order to progress
Checklist
Description
In my React application, I'm using useRefreshToken: true and have enabled refresh token rotation in my Auth0 application.
From the useAuth0 hook, I am calling the getAccessTokenSilently() function with the following options:
{ cacheMode: "off", authorizationParams: { myOrgId: 'xyz', } }
I am using cacheMode: "off" to leverage the refresh token rotation functionality and enhance the security of the application. Additionally, I am passing authorizationParams to include specific parameters that should be returned within the access token for later use. However, I am encountering an issue where the response contains an empty params object, and the expected parameters are missing.
I have ensured that I am using the latest version of the Auth0 package available on npm and validated token request dualy that data should be passing and it's passing correctly, but the issue persists.
Reproduction
Setup Auth0:
Enable refresh token rotation in your Auth0 application settings.
React Application Setup:
Configure your React application to use Auth0 with useRefreshToken: true.
Implementation:
Utilize the useAuth0 hook in your React component.
Call the getAccessTokenSilently() function with the following options:
{ cacheMode: "off", authorizationParams: { myOrgId: 'xyz', } }
Try refreshing browser tab and rotate new token.
Observation:
Check the returned access token for the params attribute.
Note that the params object is empty, and the expected myOrgId parameter is missing.
Additional context
No response
auth0-react version
2.0.0 & 2.2.4
React version
18.1.0
Which browsers have you tested in?
Chrome
The text was updated successfully, but these errors were encountered: