- Newest
- Most votes
- Most comments
Increasing the token expiration settings in Amazon Cognito for refresh tokens, access tokens, and ID tokens will not automatically generate new tokens for existing users. The changes will only affect new tokens issued after the settings are updated.
For the refresh token expiration increase from 7 days to 750 days: This change is within the allowed range, as refresh tokens can be set to expire between 60 minutes and 10 years. Users who authenticate after the change will receive refresh tokens with the new, longer expiration time.
For the access token expiration increase from 60 minutes to 350 minutes: This change is also possible, as access tokens can be set to expire between 5 minutes and 1 day.
For the ID token expiration increase from 60 minutes to 240 minutes: This change is also within the allowed range, as ID tokens can be set to expire between 5 minutes and 1 day.
Regarding users who authenticated 5 days ago: Their existing tokens will not be automatically updated with the new expiration times. The changes will only apply to newly issued tokens. When these users' current refresh tokens are used to obtain new access and ID tokens, the new tokens will have the updated expiration times.
It's important to note that if you're using Amazon Cognito's managed login (HostedUI), there's a consideration for access and ID tokens. Even if you set a minimum expiration time of less than an hour, the actual expiration time won't be lower than an hour due to session cookies set by the HostedUI that are valid for one hour.
In summary, increasing the expiration times will not automatically generate new tokens or affect existing tokens. The new expiration times will apply only to tokens issued after the changes are made. Users will get tokens with the new expiration times when they authenticate again or when their existing refresh tokens are used to obtain new access and ID tokens.
Sources
Understanding the refresh token - Amazon Cognito
Understanding the access token - Amazon Cognito
Understanding the identity (ID) token - Amazon Cognito
Relevant content
asked 8 years ago
