My requirement to get accessToken using refreshToken when it expires. However, https://<my_domain.auth0.com>/oauth/token URL is returning everything except refreshToken.
So I could not get new accessToken when original is expired.
Offline access is enabled for Auth0 application. When we try to get refresh token from other programming language it works.
I could be able to resolve getting refresh token issue by enabling “Refresh Token Rotation” and “Refresh Token Rotation” properties under Auth0 application settings in Auth0 page.
I have used following code block to get local storage and also used developer tools to see local storage. Both the cases length of the local storage is 0.
I was setting cacheLocation as authorizationParams instead at Auth0Provider level. After moving that value to it Auth0Provider, I can see local storage is getting populated with the information.
On refresh it was navigating to login screen even refreshToken is enabled. I have to add isLoading check to app.tsx file and auto login only when isAuthenticated is not true. It took care of redirecting to “loginWithRedirect → returnTo” page.
It will be helpful, if someone is having issues.
Hey there @tpvlaxmi thanks for following up with the community on the resolution, much appreciated!
Linking documentation to authorizationParams for future reference - Hopefully this helps others in realizing that cacheLocation is not a property of authorizationParams but Auth0Provider like you mentioned: