Answer the question
In order to leave comments, you need to log in
What is the best way to implement authentication in Vue js 2?
Hello!
What is the best way to implement authentication for the admin panel under Vue js?
that is, where exactly you need to check for authorization by token (in the route or main.js) and where you need to do a redirect or check for rights .... well, in general, how best to implement such things?
there is an API, authorization through a token.
I read a few articles on the Internet, but they wrote a mess there ... it’s hard to understand,
give an example or advice if you work well with Vue Js
Answer the question
In order to leave comments, you need to log in
Here is a good example: https://medium.com/@pavelgonzales/best-practices-%...
Use jwt very conveniently. https://github.com/websanova/vue-auth
Authorization on routes is hung up and there is an rbac mechanism. There are solution examples for laravel.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question