How do I setup Discord OAuth2?
How to add organization details to JWT claim?
404 Error for /api/auth/sign-up
The edge runtime does not support Node.js 'net' module.
"[object Object]" is not valid JSON
getSession() doesn't return user table additional fields

requests to /api/auth/* hanging for 500s before cancelling when calling to prod URL
Google Oauth + Expo
Weird behavior when rememberMe is false.
rememberMe: false
, the session cookie is created and stored correctly (verified in browser + DB), but /v1/session
(or /api/auth/get-session
) returns null. With rememberMe: true
, everything works fine. Both od the endpoints returns the session.
What i've tried:
Cookies are correctly set (better-auth.session_token, dont_remember
) and sent with credentials: "include"
.
Headers forwarded correctly in /v1/login
, including Set-Cookie
....send additional headers
Vercel.app for previews
api.example.com
(where BetterAuth is hosted) and site.example.com
(I've configured cookiesubdomain
, etc.). Everything works perfectly in production, and I'm hosting with Vercel.
However, when I create new branches or run tests, Vercel assigns preview domains under .vercel.app
, and at that point authentication stops working....401 error Nextjs(cookies not being sent)
Refresh the page after authClient.signOut()
extending user data from another table
image
field once the img is uploaded to your Db right?Client side - get all permissions
Send additional data Google/Apple Signup
Implemeting Notion OAuth2

Stripe Plugin + AI Usage Limits - Anyone done this?
Best way for a plugin to extend session object
after
hook using createAuthMiddleware
. However, when we fetch the session on the client, it still uses the original session type.
What’s the recommended way to safely extend the session object with custom attributes while maintaining type safety?
We came across the customSession
plugin, which overrides the /get-session
route — but is that really the recommended approach for all plugins? It feels a bit hacky for something that should be more common....passing additional data from authClient to server betterAuth instance