When I refresh the page it goes back to login page again. I notice that the auth.token and refresh token are not set in browser cookies. In my local or even in prod, when I set secureCookieAttribute and httpOnlyCookieAttribute to false, the tokens are added and everything works just fine. The problem only happens when I set TRUE secureCookieAttribute and httpOnlyCookieAttribute.
My backend where I call the api is using JWT and I also tried adding
Set-Cookie: auth.token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...; HttpOnly; Secure; SameSite=Lax; Path=/; Expires=<some expiration date> in the login api response.
Environment
Reproduction
Here's my auth setup in nuxt.config
auth: { baseURL: '',
globalAppMiddleware: true,
},
Describe the bug
When I refresh the page it goes back to login page again. I notice that the auth.token and refresh token are not set in browser cookies. In my local or even in prod, when I set secureCookieAttribute and httpOnlyCookieAttribute to false, the tokens are added and everything works just fine. The problem only happens when I set TRUE secureCookieAttribute and httpOnlyCookieAttribute.
My backend where I call the api is using JWT and I also tried adding
Set-Cookie: auth.token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...; HttpOnly; Secure; SameSite=Lax; Path=/; Expires=<some expiration date>
in the login api response.Additional context
No response
Logs
No response