Nuxt/examples/auth-jwt/middleware/notAuthenticated.js

7 lines
161 B
JavaScript
Raw Normal View History

export default function ({ store, redirect }) {
// If the user is authenticated redirect to home page
if (store.state.auth) {
return redirect('/')
}
}