M
M
Mr_Romanov2019-04-09 17:19:09
Vue.js
Mr_Romanov, 2019-04-09 17:19:09

VUEJS authorization check without JWT and VUEX in router?

In my application I do not use vuex, and JWT authorization, I use php sessions.
There is a restapi where I send the login + password from there it returns, roughly speaking, true / false and the session starts on the back if true.
Inside the SPA application I use a router for navigation, how to properly wrap the routes with an authorization check?
Everywhere there are examples with JWT and with the VUEX storage, which I also don’t use.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
2
2perca, 2019-06-15
@2perca

Here you will find the answer to your question with code examples . If you can live without JWT, albeit sadly, then without VUEX in your application it will be hard in the future, because all the code for the request / processing / etc. lies in the components and as a result they grow, which leads to a deterioration in readability and support in general.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question