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 "./libs/vue-auth";
./libs/vue-auth.js
import Vue from "vue";
import vueAuth from "@websanova/vue-auth";
import bearer from "@websanova/vue-auth/drivers/auth/bearer";
import axiosHttp from "@websanova/vue-auth/drivers/http/axios.1.x";
import vueRouter from "@websanova/vue-auth/drivers/router/vue-router.2.x";
// Vue.axios = axios;
Vue.use(vueAuth, {
auth: bearer,
http: axiosHttp,
router: vueRouter
// ...
});
When removing the comment for Vue.axios = axios;
it seems to work at first glance. So I thought moving Vue.axios = axios;
to the main.js
but then again it's not working.