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

已提問 23 天前檢視次數 158 次
1 個回答
1
已接受的答案

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
支援工程師
已回答 22 天前
profile picture
專家
已審閱 21 天前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南