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

gefragt vor 23 Tagen158 Aufrufe
1 Antwort
1
Akzeptierte Antwort

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-TECHNIKER
beantwortet vor 22 Tagen
profile picture
EXPERTE
überprüft vor 21 Tagen

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen