-
Notifications
You must be signed in to change notification settings - Fork 912
Open
Labels
Description
Hi. This is my auth module configuration in my NuxtJS 2, SSR project. The issue is that none of the options I've set in the options are actually being set; that is, the cookie is created with Expires attribute having the value of Session and so it results in the first page load being redirected to the login page. I also want other attributes like secure and httpOnly for security. Am I doing something wrong?
auth: {
redirect: {
login: '/login,
logout: '/',
home: '/',
callback: false,
},
rewriteRedirects: true,
resetOnError: false,
fullPathRedirect: true,
strategies: {
local: false,
cookie: {
token: {
property: 'data.token',
required: true,
},
options: {
expires: 7,
path: '*',
httpOnly: true,
secure: true,
},
endpoints: {
login: { url: '/login/', method: 'post' },
logout: { url: '/logout/', method: 'post' },
user: false,
},
user: {
property: false,
autoFetch: true,
},
},
},
plugins: [
'~/plugins/auth.js',
'~/plugins/axios',
],
},