How to access $auth from a middleware with Nuxt ?
export default function ({ store, redirect }) {
console.log(store.state.foo)
}
How to access $auth from a middleware with Nuxt ?
export default function ({ store, redirect }) {
console.log(store.state.foo)
}
This works but there might be a better answer.
export default function (context) {
if (context.$auth.user.foo) {
context.redirect('/bar')
}
}