auth: {
baseURL: process.env.API_AUTH_URL,
globalAppMiddleware: {
isEnabled: true,
},
provider: {
type: "local",
endpoints: {
signIn: { path: "/api/login", method: "post" },
signOut: { path: "/api/logout", method: "post" },
getSession: { path: "/api/user", method: "get" },
},
token: {
signInResponseTokenPointer: "/token",
maxAgeInSeconds: Number(process.env.MAX_AGE_TOKEN),
cookieName: "auth.token",
},
session: {
dataResponsePointer: "/data",
},
refresh: {
isEnabled: true,
endpoint: {
path: "/api/refresh",
method: "post",
},
refreshOnlyToken: false,
token: {
signInResponseRefreshTokenPointer: "/refresh_token",
maxAgeInSeconds: Number(process.env.MAX_AGE_REFRESH_TOKEN),
cookieName: "auth.refresh-token",
},
},
},
}
In my backend, the token returned on the login call is a JWT token including an array of rights belonging to the user.
If this token is too long, it won't be saved in a cookie and the user will have to login at every refresh of the page.
The token I tried to use was 4609 characters long, I managed to reduce its size but I think it should be noted in the documentation that there are some size limits about the cookie size (or a console error when setting the cookie).
Environment
Windows_NTv22.14.03.18.13.28.02.11.8yarn@1.22.19-compatibilityDate,devtools,modules,plugins,css,ssr,typescript,fontawesome,svgo,i18n,spaLoadingTemplate,auth,pwa,vite,postcss,runtimeConfig,sentry,sourcemap@nuxtjs/i18n@9.5.6,@sidebase/nuxt-auth@0.10.1,@vueuse/nuxt@13.7.0,@nuxtjs/color-mode@3.5.2,nuxt-svgo@4.2.6,@vite-pwa/nuxt@1.0.4,@vesp/nuxt-fontawesome@1.2.1,@sentry/nuxt/module@9.46.0,@nuxt/eslint@1.4.1-Reproduction
/
Describe the bug
I have the following config in my
nuxt.config.ts:In my backend, the token returned on the login call is a JWT token including an array of rights belonging to the user.
If this token is too long, it won't be saved in a cookie and the user will have to login at every refresh of the page.
The token I tried to use was 4609 characters long, I managed to reduce its size but I think it should be noted in the documentation that there are some size limits about the cookie size (or a console error when setting the cookie).
Additional context
No response
Logs