DEV Community

Discussion on: Really typing Vue

Collapse
 
sobolevn profile image
Nikita Sobolev

I guess, that might be a good idea! I generally use nuxt-auth.
It involves like 3 steps to get the fully working login. Check it out!

Collapse
 
nssimeonov profile image
Templar++

Interesting. I'll check that.

We did this in our apps, using a combination of the router and vuex - the router took care of checking if the user has an auth token and if it's expired or still valid and redirects automatically to the login (passing a return page as param), vuex stores the authentication token, then all API calls automatically add the token to every request.