Home

Issue: 99

Use with vue-auth. Need access to router

[issue link]

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.

This question is available on Nuxt.js community (#c81)