Does crossSubDomainCookies not work on localhost?

So currently i have a setup where my login is on localhost:5173/login. here i get my cookie when i go to tenant.localhost:5173/admin i dont have the cookie the domain says localhost even tho its supposed to say .localhost from my understanding? setup:
advanced: {
crossSubDomainCookies: {
enabled: true,
domain: '.localhost',
},
defaultCookieAttributes: {
secure: true,
httpOnly: true,
sameSite: 'none',
partitioned: true,
},
},
advanced: {
crossSubDomainCookies: {
enabled: true,
domain: '.localhost',
},
defaultCookieAttributes: {
secure: true,
httpOnly: true,
sameSite: 'none',
partitioned: true,
},
},
am i missing something or might this be a bug because domain expects a "real domain"?
1 Reply
Silvan
SilvanOP18h ago
well this seems like a known thing lol https://stackoverflow.com/questions/1134290/cookies-on-localhost-with-explicit-domain maybe it would make sense to add something to the docs or a workaround?
Stack Overflow
Cookies on localhost with explicit domain
I must be missing some basic thing about cookies. On localhost, when I set a cookie on server side and specify the domain explicitly as localhost (or .localhost). the cookie does not seem to be acc...

Did you find this page helpful?