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

posta 23 giorni fa158 visualizzazioni
1 Risposta
1
Risposta accettata

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
TECNICO DI SUPPORTO
con risposta 22 giorni fa
profile picture
ESPERTO
verificato 21 giorni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande