* Which Category is your question related to? *
Authentication session
* What AWS Services are you utilizing? *
S3, Cognito
* Provide additional details e.g. code snippets *
Hello,
I'm working on a ReactJS project where I'm using Amplify for signup/signin, and user information is stored in cognito. I'm trying to set the timeout for a session token to be ~1 hour. From my understanding, the timeout can be set in User Pools->App clients, but I can only go as low as 1 day. Is there a way to get the user to have to sign in again if they haven't visited the site for 1 hour?
I am also trying to find this. no luck thus far.
@sandeshakya currently there is no way to set an expiry timeout for tokens in Amplify. The workaround is to set a timer or something in your app and do globalSignOut to revoke the tokens when the time's up. Doc of globalSignOut: https://aws-amplify.github.io/docs/js/authentication#sign-out
I will mark this as feature request.
Related to #1972
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I also encounter the same situation. It would be a lot more convenient if the cognito token expiry could support at an hourly scale (min. 1 hr ).
+1
+1
It becomes a pain when we try to test how our app handle the token expiration
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
Most helpful comment
+1