- Newest
- Most votes
- Most comments
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 :
- https://docs.amplify.aws/javascript/tools/cli/reference/files/#cli-inputsjson
- https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_TokenValidityUnitsType.html
- https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cognito-idp/create-user-pool-client.html
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.
Relevant content
- Accepted Answerasked 4 months ago
- Accepted Answerasked a year ago
- Accepted Answerasked a month ago
- asked 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago