Answer the question
In order to leave comments, you need to log in
How to organize work with jwt in VUEX?
Hello, what is the best way to organize the work of a site with a restful api?
There is an api, when authorizing on the site, jwt is transmitted to the client and written to localstorage, after that this token is sent in each request to the api, and if it is valid, the server returns data, and if it is invalid / the action time has ended, the corresponding sign is returned to the client and the client deletes jwt from localstorage and is redirected to /login The
question is this. Is it normal that in each request it is checked whether the server sent a sign of invalidity / expiration of the token, or are there any more reasonable options?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question