Kaylee
Explore posts from serversBABetter Auth
•Created by Kaylee on 3/14/2025 in #help
Vercel Deploy Problems - Cookies not detected?
Thank you
23 replies
BABetter Auth
•Created by Kaylee on 3/14/2025 in #help
Vercel Deploy Problems - Cookies not detected?
Yup that was the problem, completly forgot to check its set on auth.ts, only had it set on the client :D
23 replies
BABetter Auth
•Created by Kaylee on 3/14/2025 in #help
Vercel Deploy Problems - Cookies not detected?
then disabling it locally it is expected (it is enabled by default in production according to docs)
23 replies
BABetter Auth
•Created by Kaylee on 3/14/2025 in #help
Vercel Deploy Problems - Cookies not detected?
Setting it true locally causes the same issue im seeing on vercel
23 replies
BABetter Auth
•Created by Kaylee on 3/14/2025 in #help
Vercel Deploy Problems - Cookies not detected?
Ok so my problem is with the useSecureCookies stuff
23 replies
BABetter Auth
•Created by Kaylee on 3/14/2025 in #help
Vercel Deploy Problems - Cookies not detected?
Doesnt seem to be the problem i see the full session object when i console.log it
As i can see th ecookies i suppose next possible thing to look at is my middlware?
23 replies
BABetter Auth
•Created by Kaylee on 3/14/2025 in #help
Vercel Deploy Problems - Cookies not detected?
can it also support wildcards? e.g. *.vercel.app
as vercel has quite a few different domains
23 replies
BABetter Auth
•Created by Kaylee on 3/14/2025 in #help
Vercel Deploy Problems - Cookies not detected?
On the trusted origin side do you just need the hostname? e.g.
https://my-app.vercel.app/
https://my-app.vercel.app/api/auth
23 replies
BABetter Auth
•Created by Kaylee on 3/14/2025 in #help
Vercel Deploy Problems - Cookies not detected?

23 replies
BABetter Auth
•Created by Kaylee on 3/14/2025 in #help
Vercel Deploy Problems - Cookies not detected?
i do have a database hook at session.create will check if that is dying
23 replies
BABetter Auth
•Created by Kaylee on 3/14/2025 in #help
Vercel Deploy Problems - Cookies not detected?
those are the only logs
23 replies
BABetter Auth
•Created by Kaylee on 3/14/2025 in #help
Vercel Deploy Problems - Cookies not detected?

23 replies
BABetter Auth
•Created by Kaylee on 2/26/2025 in #help
Creating an org at user creation best practices
The docs does suggest to query the DB to add the organizationId to the session https://www.better-auth.com/docs/plugins/organization#set-active-organization
But yea i should probably split the logic out, the org creation for
user.create
& active org to session.create
8 replies
BABetter Auth
•Created by Kaylee on 2/26/2025 in #help
Creating an org at user creation best practices
My current working implementation is a
session.create.before
database hook
I then do some db queries to check if the user is in an organization if they are, add the first organization id to the session's activeOrganizationId
Otherwise insert a new organization, add the user as an owner & then add the org id to the sessions activeOrganizationId
I am not sure if user,create.after
finishes before session.create.before
so i just did it inside session.create.before
to be safe8 replies