Open franck-grenier opened 2 years ago
I'm facing the same issue.
I'm also seeing this issue.
Hello, I fixed this problem with the below configuration :
{
auth: {
cookie: {
options: {
expires: 365,
secure: process.env.APP_ENV !== 'local',
},
},
strategies: {
local: {
endpoints: {
login: {
url: 'auth/login',
method: 'post',
propertyName: 'token',
},
user: {
url: 'users/me',
method: 'get',
propertyName: null,
},
logout: false,
},
},
},
plugins: [
'~/plugins/updateLoggedInUser.js',
],
},
}
My goal was to change the parameters of the local strategy cookie.
Hope it will help
Hello, I fixed this problem with the below configuration :
{ auth: { cookie: { options: { expires: 365, secure: process.env.APP_ENV !== 'local', }, }, strategies: { local: { endpoints: { login: { url: 'auth/login', method: 'post', propertyName: 'token', }, user: { url: 'users/me', method: 'get', propertyName: null, }, logout: false, }, }, }, plugins: [ '~/plugins/updateLoggedInUser.js', ], }, }
My goal was to change the local strategy cookie params.
Hope it will help
Also faced with the same issue. Configuration above solved my problem. Thanks!
We have the same issue on Nuxt2 with vue 2.7 !
Hello, I'm trying to change the auth strategy of my Nuxt (2.14.11) app from
local
tocookie
and I'm getting this error :(I'm using @nuxtjs/auth
4.9.1
.)I guess my TS compilation is faulty here but I can't understand why with
cookie
and why not withlocal
.Thanks for your help !