Better Auth

BA

Better Auth

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

Join

bug-reports

help

API calls returns Unauthorized

I have better auth setup on https://accounts.domain.com in production, for testing purposes When I hit /api/auth/get-session on another app, running in localhost, I get 401 unauthorized. I also have the multi domain setup like this ...

Client Side Not Working

I am trying to login using better-auth on client side but i get this error message: "Invalid currentURL and this is the endpoint for my api http://localhost:3000/api/auth/sign-in/email?currentURL=http%3A%2F%2Flocalhost%3A8100%2Fhome

Error in NodeJS

I get this error on the latest version of better auth ```cli node:internal/modules/esm/resolve:296 return new ERR_PACKAGE_PATH_NOT_EXPORTED(...

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

Ionic Angular with Better Auth

I am trying to use the client side package for better auth but i get this error
No description

Clear session cookies on delete

After deleting the user we should also delete user session cookies

Using JWT for NodeJS Express

Hi. I noticed the table in account has access token and refresh token. Is there an example documentation? Because the current docs does not specify on how to use those

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

Help with BETTER_AUTH_URL and Redirects for Server-Side Authentication in Figma Plugin

Hi everyone! I'm working on a Figma plugin and trying to handle authentication fully on the server-side using Better Auth. I've been running into some issues with the BETTER_AUTH_URL setting and the Google OAuth flow. Here's the situation: 1. Setting BETTER_AUTH_URL to the server URL (http://localhost:5000): - Since I want all authentication logic on the server side, I set BETTER_AUTH_URL=http://localhost:5000 in my .env. - However, when I try to authenticate with Google, I get the following error:...

Crypto not found

I'm running a Solid Start app using bun and sst, however I get this error in my console: ERROR crypto is not defined Better Auth I have absolutely no idea why this happening, i got it working for a moment, but it reappeared now....

Issue with ReadableStream is locked or disturbed error and Google Sign-In using Better Auth

Hi everyone! I'm using Better Auth (version 0.5.2-beta.16) for a project, and I've encountered a blocking issue during Google sign-in integration. My setup:...

Error when using Custom Tables

I am using Better Auth with NodeJS express written in Typescript. It works with default tables but when i customised the fields i get Cannot read properties of undefined (reading 'findFirst') error. auth.ts ```typescript import { betterAuth } from 'better-auth';...

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....

Issue on NodeJS

I am using node js express with typescript. This is my tsconfig.json file ```json { "compilerOptions": {...

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...

Error with Prisma

Is it normal the execution time takes awhile because i ran into this issue ``` This request could not be understood by the server: {"type":"UnknownJsonError","body":{"code":"P6004","message":"The Query did not produce a result...

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...