Better Auth

BA

Better Auth

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

Join

bug-reports

help

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

Incorrect Fields on Client Side

I am using Express as my backend and on the server the fields for user table is updated for example name is full_name in my database but when i use client side for login for example, the field name is still name instead of full_name

Error with Immutable Headers in Better Auth Session Middleware on Deno Server

Guys Hello , I’m working on setting up session management using Better Auth with a Deno server and Hono as the framework. I followed the documentation to create a middleware for session handling, but I'm running into an issue when trying to retrieve sessions....
No description

document outdated

it should be expirationTime
No description

Session Table ipAddress

I noticed in the session table theres an ipAddress column but when users logs in, it will not capture user IP Address. I am using Angular as Frontend and Express with Typescript for my server

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