site name: ask-paper
I am using Next JS and NextAuth. I did correctly setup the authentication flow, now for a speciific type of tests I want to mock my session and I’m doing this using a custom cookie.
I set it up on client side and everything works normally on both next dev
alone, netlify dev
with next dev
as command, and vercel.
Nevertheless, once I deploy it to a netlify environment, set the cookie manually and refresh the page the /api/auth/session
endpoint is always resetting my cookie via the Set-Cookie Header.
I would like to know why is this happening, and why does this only happens in netlify deploy (not in netlify dev).