Does credentialsManager.getCredentials() save rotated refreshToken? #641
Replies: 1 comment
-
@RollinRolanding The refresh token will expire in 120 seconds and can't be used after that. For this reason the user has to login again. To avoid this you have to enable refresh token rotation or have a longer refresh token expiry. Since we will be closing Github discussions. You can raise this in Github issues and we can continue the conversation there |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My setup is simple, I have an RN app that talks to an API. I'm trying to understand if I have a misconfiguration somewhere or if I'm misusing this library.
In my Native app, the absolute lifetime of my refresh tokens is set to 120 seconds (rotation enabled, absolute expiration enabled). In my custom API, the access token expiration is set to 60 seconds.
When I call getCredentials after 60 seconds (after the access token expires), I see a new access token and refresh token come in. When I wait another 60+ seconds (after the second access token expires but within the life of the second/rotated refresh token), I get this error, as if the new refresh token wasn't saved:
a0.credential_manager.invalid: The credentials renewal failed. CAUSE: Unknown or invalid refresh token.
Is it possible that the rotated refresh token isn't being saved to the credentials manager?
I did attempt to call getCredentials followed by saveCredentials to do this manually but the behavior is even more odd. The exchange doesn't appear to register in the Auth0 console logs and my app behavior is consistent with an exchange never having happened.
Beta Was this translation helpful? Give feedback.
All reactions