Reputation: 47038
Suppose the max session life time is supposed to be 10 minutes and then the app auto logs out. How is that setup? How do we extend the session lifetime on user activity?
Upvotes: 0
Views: 235
Reputation: 2553
The JWT tokens expire a hour after they have been issued. If you want the max session lifetime to be 10 minutes, you will need to check the 'exp' value of the JWT tokens and manually disallow the usage of the app at that time, of to a "refresh" of the tokens, manually.
On the other hand, if you don't care to expire the tokens every 10 minutes, the Cognito SDKs will auto-refresh the JWT tokens for you. You can use the aws-amplify SDK to completely abstract this refresh flow.
Vladimir
Upvotes: 1