Answer the question
In order to leave comments, you need to log in
What is the best way to make/improve user login logic?
The essence of the question is that if the user already has a valid token and it needs to be
authorized regardless of where it is located in the application: stores the token and sends a request to the server to authorize the token. But I started to dislike this approach because it looks somehow "average".
2. After thinking for a while, I decided that I would authorize the user through beforeEnter in the router, they say, just protect routes from anonymous | After n time, this approach also began to seem to me like a "crutch" or the like, so I also threw it aside.
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