VueAuthenticate and $auth var
-
I’m migrating my app from v 0.14 to 0.15 and I facing a lot of problems.
First, I created a plugin named
vueauthenticate.js
with code:import Vue from 'vue' import axios from 'axios'; import VueAxios from 'vue-axios' import VueAuthenticate from 'vue-authenticate' export default ({ Vue }) => { Vue.use(VueAuthenticate, { baseUrl: '/login' }) }
So, I put
vueauthenticate
inquasar.conf.js
plugins. All dependencies are installed.But when I check the console, the var
$auth
is present in Vue but with message:Exception: Error: Request handler instance not found! at Vue.get (webpack-internal:///./node_modules/vue-authenticate/dist/vue-authenticate.es2015.js:1405:19) at Vue.remoteFunction (<anonymous>:2:14)
. Obviously, nothing works.Any idea? Thanks
-
Maybe you must tell Vue to use VueAxios just before Vue.use(VueAuthenticate):
Vue.use(VueAxios, axios)
-
@chbarr Solved! Many thanks!