Static GitHub Issues

[99] Use with vue-auth. Need access to router

prev: Vuex store on the issue of more pages
next: keywords if/then/else require v5 option

I would like to use vue-auth together with nuxt js. But i need to configure vue-auth after vue router is set.

vue-auth setup code from https://github.com/websanova/vue-auth#install-2x

Vue.use(require('@websanova/vue-auth'), {
    auth: require('@websanova/vue-auth/drivers/auth/bearer.js'),
    http: require('@websanova/vue-auth/drivers/http/vue-resource.1.x.js'),
    router: require('@websanova/vue-auth/drivers/router/vue-router.2.x.js'),
    ...
    rolesVar: 'type'
    ...
});

I tried doing this in the ~/plugins directory and i get a vue-auth error: Error (@websanova/vue-auth): vue-router.2.x.js : Vue.router must be set.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c81">#c81</a>)</em></sub></div>