C
C
claus_bor2018-03-25 18:59:43
JSON Web Token
claus_bor, 2018-03-25 18:59:43

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

1 answer(s)
S
Sergey Gornostaev, 2018-03-25
@claus_bor

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 question

Ask a Question

731 491 924 answers to any question