Skip to content

Authentication

Authentication is handled by Better Auth in @repo/auth and exposed from the Next.js app at /app/api/auth/*.

  • Email and password with email verification
  • Google and GitHub social sign-in (when OAuth keys are configured)
BETTER_AUTH_SECRET=your-32-char-minimum-secret
BETTER_AUTH_URL=http://localhost:3000/app
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
  1. User signs up at /app/signup
  2. Verification email is sent via Resend (or logged in dev when Resend is not configured)
  3. After verification, the user signs in at /app/signin
  4. Protected dashboard routes live under (dashboard) and require a session

Extend the socialProviders block in packages/auth/src/server.ts and add the matching env vars to .env.