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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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!
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.