Files
Gustavo ValverdeandRaeesBhatti 8dffad64a7 feat(auth)!: baseURL is the canonical origin; multi-host via trustedOrigins
baseURL conflated two jobs: the stable identity of the auth server and, in its
object form, a per-request host allowlist whose allowedHosts already duplicated
trustedOrigins. Per-request resolution was written three times (HTTP handler,
auth.api path, MCP), so a config shape handled in one was silently unhandled in
the others.

Collapse baseURL to the canonical origin. The hosts a deployment also serves
move to trustedOrigins (static array or per-request function). One boundary
resolver derives the per-request serving origin (the request host when trusted,
else canonical) for every entry point, so cookies and self-referential links
follow the host while identity (OAuth/OIDC issuer, JWT iss/aud, social
redirect_uri, Passkey rpID) stays canonical.

Closes #4151
Closes #8478
Closes #8548

Co-authored-by: RaeesBhatti <10067728+RaeesBhatti@users.noreply.github.com>
2026-06-16 17:42:28 -07:00
..
2026-06-15 18:30:49 -07:00
2026-04-29 20:04:16 +00: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