How can I modify the default refresh token duration in Amplify Auth?

0

I am using the AWS Amplify application. In that application, I use auth. The auth default refresh token has a 30-day validity duration. Now I'd like to change the default 30 days to 8 hours in the auth cli-inputs.json file. How can I do that?

I will share my amplify auth cli-input.JSON file screenshot (refreshtoken.png).

Enter image description here

asked 11 days ago147 views
1 Answer
1
Accepted Answer

Thank you for reaching out to us regarding the above query.

How can I modify the default refresh token duration in Amplify Auth?

You either can modify the "userpoolClientRefreshTokenValidity" parameter in cli-inputs.json file and perform an amplify push operation or you can use the modify properties via overrides on the individual user pool clients to update the same.

Please refer to the below GitHub Discussion for detailed information :

Kindly note that the "userpoolClientRefreshTokenValidity" parameter is depended on the "RefreshTokenValidity" parameter used to specify the time units such as seconds, minutes, hours or days. By default, Refresh token has days unit. Hence, to change the units, you might have to explore the overrides method to update the same.

You may also refer to the below documentation for reference on the same :

Having said that, in case you are still facing challenges, please feel free to open a support case with AWS using the following link which would allow us to check the resources internally.

AWS
SUPPORT ENGINEER
answered 10 days ago
profile picture
EXPERT
reviewed 9 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions