Answer the question
In order to leave comments, you need to log in
Authorization in Vue 3 composition?
Hello!
For the first time trying to develop authorization in Vue + compostion-api.
Tell me:
1) how to automatically catch via axios whether there is a token in localStorage JWT
2) How to automatically check if the token has expired, then make a refreshToken or redirect to the login page
3) How to receive user data automatically if, for example, you pressed f5 in the browser ( I think to store the token in localStorage, and the user data in the Store - I work with Pinia)
I would be grateful if you could help me figure it all out
Answer the question
In order to leave comments, you need to log in
1) on the server, check if the token came in cookies
2) on the server, do verify
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question