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.
Hi @scottgrayson
Sadly, nuxt.js is not compatible with vue-auth, but using JWT with Nuxt.js and the upcoming middleware feature will be really easy to do.
@Atinux Awesome! Can't wait to see the docs!
The documentation should be release today, think about checking our Twitter for the announcement :)
there is no middleware yet, what's the play we need JWT auth
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.