Export disappeared
import { type UserWithRole } from 'better-auth/plugins';
import { type UserWithRole } from 'better-auth/plugins';
User from your auth instance as that should include role if you're using the admin pluginCustom error when user has a Google account but no credentials account.
Tauri (or Electron) auth advice
role assignment during registration
Magic lInk
server.ts and from my understanding this is just your regular auth.ts file you initially create when setting up better-auth?
Then we would have something like resend or nodemailer and a server action that actually gets your email address from the form itself and send out a link to login? Or am I over complicating it for myself.
Any help here would highly be appreciated...Session from MCP call
const session = auth.api.getSession({ headers }) and from there I grab the userId
Now I want to call the same function but from an MCP server. This time session will be undefined.
I see I can use auth.api.getMcpSession({ headers }) to get the userId from an MCP call and this works fine....Can’t send verification emails after upgrading
How to do custom actions on after normal sign up and Google
Anonymous users cannot sign in again anonymously... but you can?
authClient.signIn.anonymous() while already having an anonymous session, you get a bad request error. This is intentional of course.
However, a new anonymous user is still created, with a session, and the better-auth.session_token cookie is also updated.
So either, the 400 error is nonsense because everything works properly. Or, the error is correct but all the logic is still executed. ..."superadmin" to bypass organization membership checks
Organization management for platform admins?
onboarding wizard: handle custom fields on session and caching session
How to scope MCP access tokens to a specific organization?
How to Retrieve Session in Next.js RSC Without Getting 401 (Next.js + Hono Integration)
Issues signing in with SSO
Session is set to www domain
Custom JWKS endpoint?
Polar plugin

Multisession orgs list for diffrent accounts
