Better Auth

BA

Better Auth

Join the community to ask questions about Better Auth and get answers from other members.

Join

bug-reports

help

Trusted Origins Wildcards

Hello, I'm running into following error and I'm clueless if it's perhaps a BetterAuth Bug. I'm setting up my previews on Vercel and added following trustedOrigins into my list: https://*-my-team-gmbh.vercel.app but it's not working as expected. ...

Some betterAuth endpoints not working in ElysiaJS

After loads of modifications to my code I found that BetterAuth's routing is conflicting (somehow) with @elysiajs/static, only when the prefix variable is set to '/'. With this error, some betterAuth endpoints fail to resolve...

Big Error caused by Timeout

Since I migrated from 1.2.5 to 1.2.12 i been getting this message a lot And it completely messes with my app since it prevents from getting a valid session on the backend I run a nextjs frontend and expressjs backend...
No description

CallbackURL being truncated on sign up

When I sign up via email + password, the url looks correct in the email i.e. http://localhost:3000/auth/sign-in?provider=credentials&newUser=true But when I click the link, it takes me to: http://localhost:3000/auth/sign-in?provider=credentials - cutting off the extra queries ...

Duplicate Email Issue Google Auth

Hi I am building an app for my sass product, I am using google auth for the sign in and sign up both. But there is a mysterious issue, this yet only happen to one email address that when I am sign in it creates new user account event though that email is already existed in the users table. ```export const auth = betterAuth({ database: mongodbAdapter(db), emailAndPassword: { ...

Authenticated userโ€™s email not prefilled in Polar checkout

Hey team โ€” Iโ€™m having trouble with the Better Auth + Polar integration. User flow: 1. A user signs up via Better Auth (email/password or Google)....

Facing a weird intermittent issue that's blocking our signups

Using "better-auth": "^1.2.9"/Next.js and Postgres. Have GitHub/Google Signups. When user is new on platform and tries to sign it, it says the error given in the photo. But when you go back. close tab, again open app, refresh and signup, then it signin without any issue. The api logs says:...
No description

๐Ÿ› Turbopack Build Error since new zod Release

Hey there, opened this issue in zod's GitHub (as downgrading zod fixes it), but it might be related to better-auth as well: https://github.com/colinhacks/zod/issues/4810

Type of listTeams is inferred as unknown[]

I am running into an issue with both frontend and backend in a TanStack Start project where the type of listTeams is inferred as unknown: ```ts // backend export const auth = betterAuth({...
Solution:
Opened the PR, you can track it here: https://github.com/better-auth/better-auth/pull/3243...

await authClient.admin.removeUser

I just try to remove an User, and it return success: true but i literally didn't put any id and i leave the code like this ```js const deletedUser = await authClient.admin.removeUser({ userId: "user_id_here", });...
No description

using the useSession hook with react/next

Code for context: ``` import { createAuthClient } from "better-auth/client"; export const authClient = createAuthClient({...
Solution:
Okay I figured it out, useSession only works if your are using better auth and next as full stack not if you have your better auth backend on express and just using next as a front end.

reactStartCookies plugin make tanstack build fails

Hello ๐Ÿ‘‹ I'm trying to use better-auth with tanstack start but with a separate backend (a nestjs api). Following the documentation and using the plugin for cookies:...

Version ^1.2.12, the authClient.useListOrganizations has no call signature

Solution:
You're importing createAuthClient from better-auth/client. Change the import path to better-auth/react
No description

Allow defaultValue to equal false in additional fields

Settings defaultValue: false as a boolean literal makes it fail the schema check because of the following
if (fields[key].defaultValue && action === "create") {
parsedData[key] = fields[key].defaultValue;
continue;
}
if (fields[key].defaultValue && action === "create") {
parsedData[key] = fields[key].defaultValue;
continue;
}
...

Anonymous user account linking problem

I have nextjs project in which i use betterauth. When account linking happens old session cookies are not deleted. Steps to reproduce: 1. User signs in anonymously 2. User signs in (or signs up) via email...

stripe 404 error

i am getting the error when running http://localhost:3000/api/auth/subscription/upgrade 404 when using ```typescript await authClient.subscription.upgrade({ plan: //plan,...

Better Auth Error after upgrade to 1.2.10

there is an error show after sign-in via google in https://www.better-auth.com/ and my website i try to downgrade and it fixed so the error comes with latest version any fix? http://localhost:3000/api/auth/error?error=please_restart_the_process...

403 forbibben response

403 forbidden and 401 error response are not getting after-hook, ` api: send-verification-email request:...

authClient.getSession wrong return type

when using authClient with ```ts fetchOptions: { throw: true }...
Solution:

[Organizations] usePlural doesn't work

Hey guys. Im facing this issue and not sure if the problem is on my side. When I use custom model names for Organization plugin like this: ``` plugins: [...