Files
better-auth/docs
Gustavo Valverde 7484c5dd3e feat(sso)!: add mapProfileToUser and use only email-format NameIDs as emails
SSO sign-in failed whenever the provider sent no email, with no hook to
supply one. mapProfileToUser runs on every OIDC and SAML sign-in before the
user is looked up and can return the email, name, image, and emailVerified.

A SAML NameID now becomes the email only when its Format is emailAddress,
matching Keycloak and Ory Polis. Persistent and transient NameIDs are opaque
and were being stored as user emails.
2026-10-14 10:50:46 +01:00
..
…

Better Auth

Website & Docs

The main website and documentation for better-auth.com

Website GitHub Stars License


Quick Start

# install
pnpm install

# develop
pnpm dev

Open localhost:3000 to preview.

Stack

  • Framework: Next.js 16 (App Router, Turbopack)
  • Styling: Tailwind CSS 4
  • Animation: Framer Motion
  • Docs: Fumadocs
  • Icons: Lucide React
  • Fonts: Geist Sans & Geist Mono

Structure

├─ app/
│  ├─ page.tsx              # Home — hero + sign-in demo
│  ├─ products/             # Products page
│  ├─ blog/                 # Blog posts
│  └─ docs/[[...slug]]/     # Documentation (MDX)
│
├─ components/
│  ├─ landing/              # Marketing components
│  ├─ docs/                 # Documentation components
│  ├─ ui/                   # Shared primitives
│  └─ icons/                # Brand icons & logo
│
├─ content/                 # MDX documentation files
│
├─ lib/
│  ├─ source.ts             # Fumadocs content source
│  └─ utils.ts              # Utilities
│
└─ public/
   └─ branding/             # Logo assets (SVG + PNG)

Scripts

pnpm dev          # Start dev server (Turbopack)
pnpm build        # Production build
pnpm start        # Serve production build
pnpm lint:fix     # Lint & auto-fix with Biome