Clarification about refreshing access token

Hi,
i use react-native-auth0 in my react native expo app and have refresh token rotation enabled. Once the access token is expired I call the getCredentials() hook to request a new token pair. The way i currently understand it is, the maximum refresh token lifetime is not reset after a new token pair is issued.

I did a test with:
Access Token life time: 5 seconds
Maximum refresh token life time: 10 seconds
Login → 6 seconds wait → getCredentials() call: new token pair is issued → 6 seconds wait → getCredentials() call: the refresh fails → new login is required

Is this the way it should work or have I overlooked something here?

Hi @stefan.boitschuk,

Welcome to the Auth0 Community!

Yes, this is correct! The maximum token lifetime of a refresh token does not extend when tokens are rotated.

I recommend taking a look at our Configure Refresh Token Rotation which mentions this.

Let me know if you have any other questions.

Thanks,
Rueben

HI @rueben.tiow,

thanks for the quick replay and clarification.

many thanks

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.