Better Auth

BA

Better Auth

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

Join

bug-reports

help

Server auth not working (SvelteKit) via signin with email

Hey everyone, When I try to sign in with email and with server actions, the session doesnt seem to set or authentication simply doesnt complete In this code: `try { let res = await auth.api.signInEmail({ body: {...

Github Oauth not working in production

Hey everyone, I have a web app built with SvelteKit, for oauth with github everything works well and as expected in development environment or for localhost app, but things break and in console a 500 (Internal Server Error) logs out, am really not sure why is this happening, I have just followed the instructions from docs as it is, Help would be really appreciated. I don't know if it requires reproduction, cause there's nothing different going on from the docs steps, its just things dont work in production (Also, I deploy on cloudflare pages.)...

Failed to get source map when using auth.api.getSession() during first request

Hey there šŸ‘‹, I am having an issue getting my session on the server in a single request. Currently, it seems that two requests are being made for session data, and as for a brief moment, components accessing session data using useSession() render improperly. Has anyone had this issue before? Where can I begin to debug? ```GET /api/auth/session 401 in 78ms...

[Not sure if bug] Admin plugin does not use the Infering Types

As title says Using the create user ```const newUser = await authClient.admin.createUser({ name: "Test User",...

crossSubDomainCookies no stored state found

Hello, I am trying to configure lcross SubDomainCookies and I am receiving the following error when trying to log in No stored state found everything works fine until I activate crossSubDomainCookies this is my settins in auth.ts : advanced:{...
No description

'import.meta' is currently unsupported, js engine: hermes [Component Stack]

…import {env as p} from ā€œstd-envā€; I’m getting this in an Expo/React Native project. The Metro Bundler has no import.meta support yet and it seems like this could take a while...

better-auth take big size when imported

When import { betterAuth } from "better-auth" -> the size is 311kb look in the kysely package is take 49.7% form the size Please take care about package size and optimize it well...
No description

Request Keeps Pending (Express.js)

im using next.js for frontend and express for backend, why it keeps pending when i'm doing sign up with email and password?
No description

authClient.signOut error when multiSession() enabled with prisma adaptor

ERROR Invalid prisma.session.delete() invocation nextjs app - better-auth 0.5.2-beta.17 after encountered similar error on my project, i cloned the official demo app and replaced database adaptor with prisma ended up with the above mentioned error. error is not present when removing multiSession() plugin....
No description

ReferenceError: process is not defined (Cloudflare + Sveltekit)

Using BetterAuth in connection with Cloudflare and Sveltekit, brings following error: ReferenceError: process is not defined This internal error only appears in the deployed Version on Cloudflare and not the local one. Most likely duo using imports like for example the filesystem (fs) which is not nativly supported in Cloudflare....

Google SSO not working

Social auth with google is currently not working for me. In my production environment and same for demo.better-auth.com/sign-in...

signUp on server-side not sending sendVerificationEmail()

Since the changes in v0.4.12 (though I’m not 100% sure), sendVerificationEmail() is no longer triggered automatically when I call auth.api.signUpEmail(). Next.js Server-Action: ```ts...

syntax error and generateId when using postgresql

Hi, I'm trying to generate a custom id in a postgres db, but there is an error when I try to use the syntax needed to add the generateId, when using: database: new Pool({ connectionString: ""...
No description

Argument `username` is missing when connecting with GitHub Provider

```ts model User { id String @id username String name String...
No description

crossSubDomainCookies OAuth state mismatch

Hello, I am using better-auth together with cross SubDomain Cookies in turborepo, but I can't get it to work with google, when I try to log in it generates OAuth state mismatch error
No description

nextjs installation problem

Hola, acabo de clonar su ejemplo de nextjs y estoy tratando de hacerlo funcionar en local, ejecuto pnpm install y se instala todo correctamente excepto best-auth.
No description

Can't use Cloudflare D1 database with Hono backend on Cloudflare Workers

Due to the fact that the env context is only exposed to incoming requests, It can't seem to be possible to create a config for better-auth on Hono using the D1 Database from Cloudflare Workers. This example of D1 with better-auth is for the OpenNext new implementation for Workers, I'm wondering if there's a way to set it up also on Hono. I've been able to make it work from SolidStart with a similar configuration but I'm stuck on Hono, and I'd prefer to have the server backend of better-auth on a separate Hono Worker without relying on CF Functions from the full-stack app....

2fa with oauth with next js template

I'm trying to activate 2fa in your nextjs demo but I can't set the password to log in I'm using google You should be asked to set a password or send a code by email...
No description