Answer the question
In order to leave comments, you need to log in
How to automatically renew access token jwt via refresh token?
Please tell me how to automatically update access token jwt through refresh token. I understand that there is a separate route for updating the access token, but there will be no button in the frontend: the access token has expired, click on the button to update. So how to automatically update?
Answer the question
In order to leave comments, you need to log in
In Axios request interceptor, or in any other request interceptor, add a check for the term of the token, and if it has expired, then make a request for refresh, and after updating the token, continue executing the original request.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question