Cookies amongst multiple tenants, subdomains, and custom domains for a SaaS
mycoolapp.com
where i'll be serving the marketing, john.mycoolapp.com
, and maryscoolapp.com
).
Looking for guidance on how to get it working with BetterAuth; my stack is SvelteKit, with Postgres + Drizzle (using the direct Postgres connector, though), with Directus as the CMS for end users. Currently I'm having an issue where the cookies are being set on the TLD and not working on the subdomains.
I'm aware that there's an organisation plugin, but that doesn't look to have anything specific to sharing cookies between sites....Sign Up with Additional Data
Stripe `priceId` is undefined
Better auth is not letting my database generate the default id even though I set
advanced.generateId
to false
Multiple database queries for getSession()
Wildcard domain
Social login for native apps
Session Caching with Custom Fields Workaround
Session caching, including secondary storage or cookie cache, does not include custom fields. Each time the session is fetched, your custom session function will be called.
Session caching, including secondary storage or cookie cache, does not include custom fields. Each time the session is fetched, your custom session function will be called.
Seeding doesnt work
auth.api.getSession doesn't reading Authorization header
Modify User
How to log in from the server
OAuth custom headers in token request
nextjs + nestjs
https://www.better-auth.com/docs/plugins/passkey
How can I do multiple Database calls 'during' user creation transaction in google OAuth?
How to handle this error myself?

Is it okay for getsession req to be made for every protected route or I should cache it?
JSON.parse error in Express.js
