mirror of
https://github.com/better-auth/better-auth.git
synced 2026-08-15 08:25:06 -05:00
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>
Website & Docs
The main website and documentation for better-auth.com
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