Answer the question
In order to leave comments, you need to log in
How to refresh token after each request?
There is such a task - to change the token after each request is completed, I need this so that the blocked user cannot continue to remain in the system, and the jwt token system does not imply this. The problem is that I did not find how to make a handler that will be processed after each request is made, I need something like HttpInterceptor-a, only after the request and not before.
angular 7
Answer the question
In order to leave comments, you need to log in
How will you invalidate the token? Store them in a service and prevent reuse?
It is easier or to make tokens with a very short lifetime not tied to the number of requests. Or implement an analogue of crl, i.e. disabled tokens are entered into a sheet and this sheet is either requested each time or synchronized. The leaf will not grow because the tokens in it are only within their validity period, and forced invalidation of the token is a rather rare situation.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question