For use with the websanova/vue-auth Vue.js library.
Questions tagged [vue-auth]
9 questions
2
votes
1 answer
websanova/vue-auth not set bearer token vue 3
I used websanova/vue-auth for authentication in my vue-3 app.
I follow the documentation the login was successful but when I try to get the user it did not pass the token or bearer token.
vue-auth configuration.
auth.js
import {createAuth} …

Kenneth
- 2,813
- 3
- 22
- 46
2
votes
0 answers
Access token not passed in subsequent requests (websanova/vue-auth for Laravel & Vue SPA)
I've been banging my head against the wall for hours now and I'm hoping someone can help me finalize the setup of the websanova/vue-auth library so my Vue SPA can authenticate against my api endpoints.
The point I'm at is that I'm performing a login…

Snevi
- 21
- 3
2
votes
0 answers
Undefined $auth in Vue using @websanova/vue-auth
I am trying to create SPA using Vue.js and Laravel as backend. I am using tymon/jwt-auth for JWT Authentication at the backend.
I cannot find $auth in my Login.vue.
I included @websanova/vue-auth in my app.js like this
...
import {createAuth} …

Pankaj Jha
- 886
- 15
- 37
2
votes
2 answers
Vue-Auth : Cannot read property 'beforeEach' of undefined
I'm trying to use my SPA VueJS with a Laravel API.
For handling the role based authentication, I've found the plugin vue-auth :
Github : https://github.com/websanova/vue-auth
Documentation : https://websanova.com/docs/vue-auth/home
This plugin looks…

Mickaël
- 124
- 1
- 11
1
vote
1 answer
Console error with vue-auth and axios: "Uncaught (in promise) Error: Request failed with status code 401"
For authentication I'm using vue-auth@^3.2.0-beta with the axios HTTP driver. axios itself is on 0.19.2.
Sample code
this.$auth.login({ data: body, redirect: false }).then(
() => {
// Do success stuff...
},
e => {
this.error = true
if…

Robert Strauch
- 12,055
- 24
- 120
- 192
1
vote
1 answer
TypeError: this.Vue.axios is undefined when using axios HTTP driver
Using vue-auth (vue-auth on GitHub) with the Axios HTTP driver I get the following error in the browser console:
TypeError: this.Vue.axios is undefined
main.js
import Vue from "vue";
import App from "./App.vue";
import axios from "axios";
import…

Robert Strauch
- 12,055
- 24
- 120
- 192
0
votes
0 answers
Vuex JWT Refresh token
I want to know how to keep user logged in all the time, so that when his token about to expire he could refresh it and would not receive 401 status when entering guarded routes and so that his data could be reflected on page whenever he refreshed…

vladissick
- 1
- 1
0
votes
2 answers
what is the typescript type of app in vue 3
I am using Vue 3 and vue-auth together.
For vue-auth, my project needs to create http/index.ts, containing:
import axios from 'axios';
axios.defaults.baseURL = process.env.VUE_APP_API_URL;
export default (app) => {
app.axios = axios;
…

morteza mortezaie
- 1,002
- 14
- 37
0
votes
2 answers
My vuejs navigation guard not working as expected
i am using vuex for statemanagement
this is my vuex code ,
here my logic is if token is exist in local storage then it will set isAuthenticated to true so it will be easy to check against routes.but some how its not working.
import axios from…

ProBot
- 133
- 2
- 12