I am currently using Nuxt Auth for my login and session management. Everything is going smoothly. However, I have a problem with the way my set up is handling cookies. I am not sure where I went wrong. Whenever I set the auth._token.local in the application tab of dev tools, it sets the logged in status to true. Here are my configurations:
nuxt.config.js
auth: {
// cookie: false,
watchLoggedIn: false,
redirect: {
callback: false,
login: '/',
logout: '/',
home: '/home'
},
strategies: {
local: {
token: {
property: 'token',
type: 'Bearer ',
maxAge: 7200
},
user: {
property: false
},
endpoints: {
login: {
url: '/api/authenticate',
method: 'post'
propertyName: 'data.token'
},
logout: false,
user: false
},
autoLogout: true
}
}
},
router: {
middleware: [ 'auth' ]
}
setting the highlighted cookie to true will let the user browse the protected pages.