Open mlorenzog opened 4 months ago
@agracia-foticos I don't think it is related, as #790 refers to authjs
provider, while this refers to refresh
provider
Hello I had a similar issue and I solved it by clearing the browser data. But before doing that, try checking if the problem is solved in an incognito browser window.
Environment
Darwin
v18.17.1
3.11.0
3.10.1
2.9.4
yarn@1.22.21
-
devtools
,modules
,srcDir
,image
,i18n
,colorMode
,app
,components
,runtimeConfig
,auth
@nuxtjs/eslint-module@4.1.0
,@nuxt/ui@2.15.2
,@nuxt/image@1.3.0
,@nuxtjs/color-mode@3.4.0
,@nuxtjs/i18n@8.2.0
,@pinia/nuxt@0.5.1
,@sidebase/nuxt-auth@0.7.1
-
Reproduction
Start a new project, using this auth configuration:
auth: { globalAppMiddleware: { isEnabled: true }, // Important, this variable is set at build time baseURL: process.env.AUTH_BASE_URL // https://sidebase.io/nuxt-auth/configuration/nuxt-config provider: { type: 'refresh', pages: { login: '/auth/login' }, endpoints: { signIn: { path: '/api/login', method: 'post' }, getSession: { path: '/api/v1/user/data', method: 'get' } // signOut: { path: '/logout', method: 'post' }, // signUp: { path: '/register', method: 'post' }, },
}
Describe the bug
Using that configuration only the refresh token is stored at the cookie, not the session token.
We have tested it and detected that changing the same-site attribute of the token cookie to "lax" it works, but by default the same-site attribute is setted as "none" for that schema. According to the source code the default value should be "lax" (https://github.com/sidebase/nuxt-auth/blob/cb3db19563f8cb3af6dd63097e91305697c3ce8a/src/runtime/types.ts#L168)
Additional context
No response
Logs
No response