SvelteKit cookie get's nuked after being created

So I have a setup of sveltekit + elysia backend(separated services) created with t-better-auth.. locally everything works perfectly. but in production my login does not work at all, the cookie get's created (I can see through the chrome devtools), but then when the redirect to /dashboard happens, the cookie gets nuked and the hooks.server.ts is unnable to validate the session. This would make so that the only viable way of working with better-auth in sveltekit would be 100% client-side code, which is horrible for both DX and UX. What am I missing here? envs are all set up correctly, same domain with 2 different subdomains. crosssubdomain option enabled, sveltekit cookies helper enabled in the auth-client(tested with it on and off, both don't work)
No description
No description
No description
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?