Index live · v1.3.0 · MAY 24 2026
DevelopmentIntermediate

Build a Complete Auth Flow with Better Auth + shadcn + Resend

Every SaaS hits the same wall in week one: auth. This workflow takes you from `npx create-next-app` to a working email/password + magic link + email verification + protected dashboard in ~40 minutes. Built on Better Auth v1.6.11 (Auth.js merged into it as of 2026), shadcn CLI v4 (March 2026 release with skills + presets), and Resend with React Email. Covers the Next.js 16 `proxy.ts` rename, the CVE-2025-29927 defense-in-depth pattern, and the migration step where 90% of Reddit threads die.

40 min setup8 components6 skills2 MCP serversLast updated

Skills

MCP Servers

Setup

Start with the shadcn CLI v4 since it now ships first-class Next.js scaffolding. `--base radix` picks Radix as the primitive layer; the CLI handles Tailwind v4 config, the `cn` util, and `components.json` automatically.

npx shadcn@latest init --template next --base radix --name my-saas
cd my-saas

Use Cases

  • B2C SaaS with email/password + social logins
  • Indie hacker MVPs needing magic-link sign-in
  • Apps requiring email verification before first sign-in
  • Products adding 2FA via OTP
  • Next.js 16 apps migrating from Auth.js v4
authbetter-authnext.jsshadcnresendmagic-link2faemail-verificationproxy.ts