I'm using Vue-auth package for authentication of my vue-cli application.
Everything is working fine but when I'm accessing this code in my vue actions it returns undefined
. any idea?
const AuthService = {
test(data) {
console.log(this.$auth)
},
}
You can access the auth instance of the package at Vue.auth property.
import Vue from 'vue'
const AuthService = {
test(data) {
console.log(Vue.auth)
},
}