I'm trying to get authentication to work across multiple domain and this was the suggested workflow I've found. The only issue is that even though I'm setting domain as .website.app the actual cookie in the browser is displayed as www.website.app which doesn't allow authentication on my subdomains.
Any help would be greatly appreciated!
cookies: {
sessionToken: {
name:
process.env.NODE_ENV === "production"
? `__Secure-next-auth.session-token`
: `next-auth.session-token`,
options: {
httpOnly: true,
sameSite: "lax",
path: "/",
secure: true,
domain: ".website.app",
},
},
}