stripe setup
im using the stripe plugin and i have 2 plans on stripe: pro and enterprise. when i upgrade from free to pro its working fine and i see pro in the db. but when i upgrade my sub from pro to enterprise
```js
const upgradeParams = {
plan: plan.name,...
Can’t find client plugins
Hello. I just can’t find any client-side plugins. I just tried do import OTP plugin but i didnt find it.
Can someone help me? please.
I reinstalled all the node modules and the better auth...

Adding simple role to User Schema
hi guys! im having a little issue with adding a role to my User schema. I'm using Prisma and i wanted to add a role property to the User schema. It all works well, until i need to use the authClient.useSession() hook. I get the session off of it, but when trying to access the session.user.role property, it says there is no role property on it.
What i've already tried:
- Adding aditionalFields property to the better auth instance...
Solution:
alright, i'll summarize the fix in here for anybody who happens to have the same issue in the future:
To add a custom field to your User schema:
1. In your auth.ts file, add the user.additionalFields property: (dont mind the prismaAdapter or socialProviders, these are specific to my project)...

Elysia + Next.js: No session data on client
Hi,
I’m using Better Auth with Elysia on the back-end and an auth-client on the front-end with Next.js. The login flow seems to be working correctly (I’m using the Microsoft provider), but the user session is not being persisted.
After logging in, the session data always returns as:
...
onAPIError does not get called?
Hey, I've been trying to get better-auth to throw an APIError from the handler or at least a way to customize the response but it seems like that onAPIError is broken? It does not get called when an error happens on better-auth
Get fresh access token from oauth (keycloak) ?
How can i make better auth fetch a new access token from my provider if the token expires ?
hex string expected, got object, while trying to add jazz.tools integration
This is the error I'm getting:
```
2025-09-24T08:09:32.061Z ERROR [Better Auth]: Error Error: hex string expected, got object
at hexToBytes (../src/utils.ts:53:37)
SERVER_ERROR: Error: hex string expected, got object...
auth.api.hasPermission
I am having an issue with the hasPermission that it is not being recognized and is not a function of auth.api. I confirmed my version and checked the auth-client and auth setup. Any ideas?
Better auth plugin extension
I see there is some issue when we add a new endpoint with plugin. Every endpoint gets prefixed with /api/auth/some-endpoint. It would work functionality wise but it would be weird as I don't want stripe would be prefixed auth /api/auth. Is there any workaround for that?
Sign Up with Phone + Password
I want users to sign in with their phone number and password. Thankfully it already is implemented. But I can't figure out where exactly I am supposed to call sign up with phone number & password. Is there no such a thing or am I missing something from the docs ?
How to avoid singleton database when setting up better auth
from what I am seeing in the installation steps, the way to set this up is by making a specific file in an specific folder and exporting specifically an
auth variable:
```ts
import { betterAuth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
import { db } from "@/db"; // your drizzle instance...auth.api functionality
when we call auth.api.signIn from server does it make fetch request or it is just a function call from server to server?
Removing image from session user details
Hey all wondering if there is a way to customize the better-auth return object for a users attributes in a session, expo has a SecureStore size limit of 2048b that is being filled by the image base64 string
Multi-Tenant custom domains
How can I dynamically add my customer's own domains to trusted origins if I want them to be able to configure their own domains like in the Vercel Platforms example?
Caching of server-side API
@Better Auth Are server side functions like auth.api.getSession cached or should I wrap them with react's cache()?
`user.additionalFields` aren't being returned when using `admin.listUsers`
Hi 👋
I'm showing users table in admin and using
admin.listUsers to get the data. However, I'm not getting columns I already mentioned in user.additionalFields config.
Here's how I configured:...Multi-Organization Sessions
I’m currently using the organization and OIDC provider plugins to build a multi-tenant system, and I’d like to confirm that my design is correct.
Current setup:
- I have a core authentication server and several client web apps. Sessions are handled through the Better Auth OIDC provider.
...
Extend default API routes
Hello, i would like to know if it's possible to modify the payload used on the default API routes when using the authClient, more specificaly this one:
GET /api/auth/magic-link/verify?token=
I'm trying to do a signup with magic link but my schema needs an additional field....

How to change the redirect after linking a social provider?
I'm having a hard time figuring out how I can tell
better-auth to redirect to, let's say, /dashboard/connections/discord after a user links their Discord account to their main account via:
```html
<button
onclick={async () =>
await authClient.linkSocial({...Solution:
You can pass in a callback url with the provider like
await authClient.linkSocial({
provider: "discord",
callbackURL: "/dashboard/connections/discord"...