shadow
Explore posts from serversBABetter Auth
•Created by shadow on 4/16/2025 in #bug-reports
Email Verification required and Captcha return the same error code
Hey! 👋
I think this might be a bug — or at least a DX issue — because the current implementation doesn’t let us differentiate between different failure cases.
Here’s the relevant code:
The issue is that both of the following failure cases return the same 403 status:
- When the user hasn’t verified their email.
- When the captcha check fails.
The frontend can’t tell them apart, so users get the same error message either way — which is confusing and bad UX.
3 replies
BABetter Auth
•Created by shadow on 3/28/2025 in #help
Middleware in a Better Auth Project
how the middleware of a project using better-auth should look?
because i was using this middleware:
and verified that my app is vunerable to the latest nextjs vunerability, how should i modify the middleware even after upgrading to the already patched version?
because i heard that its not a good practice to do authentication in the middleware, so even after upgrading to the latest version of nextjs i wanna make things right
5 replies
BABetter Auth
•Created by shadow on 3/15/2025 in #help
user.findFirst and session.findFirst being run too many times

3 replies
BABetter Auth
•Created by shadow on 3/7/2025 in #help
Trigger annualDiscountPriceId on Stripe
Hey devs, i defined a
annualDiscountPriceId
but i dont know how can trigger it with the subscription.upgrade
5 replies
BABetter Auth
•Created by shadow on 3/1/2025 in #help
Help with Middleware Session Cookie (Development vs Production)
Hey everyone! I’m running into an issue with my middleware, and I can’t quite figure out what’s causing it. The problem occurs when switching from the development environment to production.
Here’s the scenario:
In Development: The
getSessionCookie
function returns the session cookie as expected.
In Production: After logging in, the session cookie is always null
.
Here’s the code I’m working with:
What I’ve tried so far:
1. Verified that cookies are being set correctly in production.
2. Checked that the environment variables and configurations match between dev and production.
3. Tried logging the sessionCookie
to see if there's any difference, but it still comes up as null
in production.
Has anyone encountered this before or have any idea what might be causing this behavior?2 replies
BABetter Auth
•Created by shadow on 2/27/2025 in #help
Error generating schemas.
Why i cant generate the schemas?
5 replies
BABetter Auth
•Created by shadow on 1/15/2025 in #help
Added additional field, but authClient.signUp.email doesnt accept it

4 replies