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

1 Resposta
1
Resposta aceita

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
ENGENHEIRO DE SUPORTE
respondido há 22 dias
profile picture
ESPECIALISTA
avaliado há 22 dias

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas