Answer the question
In order to leave comments, you need to log in
How to extend the life of a token?
Hello, I am creating a token on new user registration with an expiration of 10 minutes. When a new user logs in, I need to request this token. And with further requests for any route, I need to extend the life of a particular token. I am using jwt. How to change the expiration of an already created token?
Answer the question
In order to leave comments, you need to log in
No way. The user is issued two tokens - an access token with a short lifetime and a renewal token with a long one. When the client detects that the access token has expired, it sends a renewal token to the server. If the renewal token is valid, the server returns two new tokens.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question