AUTH STARTER · OVERVIEW
Overview
Auth is the first thing every app needs and the last thing anyone wants to build. This template ends that loop.
Here's the honest pitch: we got tired of rebuilding the same auth stack on every project. Email & password, OAuth, magic links, OTP, passkeys, 2FA, phone numbers, captcha — every single one is a half-day rabbit hole. So we did it once, properly, and made it the template we wish existed when we started.
This isn't a bare-bones "just sign in" starter. It's the full stack — every auth method Better Auth ships, all the gotchas already fixed, the UI already designed. You flip toggles in one config file and the right buttons show up on the right pages.
What's wired in
- Email & password — with proper password hashing, autoSignIn, and password reset.
- OAuth — Google and GitHub out of the box (add more in 4 lines).
- Magic link — passwordless via email, Resend + React Email templates.
- Email OTP — 6-digit codes for sign-in, verification, password reset.
- Passkey (WebAuthn) — Face ID, Touch ID, hardware keys.
- Phone number OTP — UI ready, plug in your SMS provider.
- Two-factor (TOTP) — QR code setup, backup codes, recovery.
- Multi-session — let users be logged in to multiple accounts.
- Admin — ban, role assignment, user management.
- Captcha — invisible Cloudflare Turnstile on every auth endpoint.
- Rate limiting — auto-enabled in production.
- Bearer tokens — for mobile clients and machine-to-machine.
What this template is NOT
- It's not a SaaS template. No billing, no orgs, no teams. Just auth, done right.
- It's not magic. You'll need a Postgres and a Resend account. Both have generous free tiers.
- It's not locked in. Better Auth is your dep, Drizzle is your ORM, Next.js is your framework. We didn't invent anything — we wired it together so you don't have to.
How these docs are written
Founder voice, on purpose. Anything marked "the bug we hit" cost us an evening. Anything marked danger will cost you one if you ignore it. Anything marked tip is a shortcut we wish we'd known sooner.