mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25:12 +00:00
7161c6f191
* Add JWT exmaple source code * add sample code * [fix] eslint * Update index.js * [fix] rename middleware\ / to middleware/ * Add default value for demo
7 lines
149 B
JavaScript
7 lines
149 B
JavaScript
export default function ({ store, redirect }) {
|
|
// If the user is not authenticated
|
|
if (!store.state.auth) {
|
|
return redirect('/login')
|
|
}
|
|
}
|