Authentication
Authentication is handled by Better Auth in @repo/auth and exposed from the Next.js app at /app/api/auth/*.
Supported methods
Section titled “Supported methods”- Email and password with email verification
- Google and GitHub social sign-in (when OAuth keys are configured)
Environment variables
Section titled “Environment variables”BETTER_AUTH_SECRET=your-32-char-minimum-secretBETTER_AUTH_URL=http://localhost:3000/appGOOGLE_CLIENT_ID=GOOGLE_CLIENT_SECRET=GITHUB_CLIENT_ID=GITHUB_CLIENT_SECRET=- User signs up at
/app/signup - Verification email is sent via Resend (or logged in dev when Resend is not configured)
- After verification, the user signs in at
/app/signin - Protected dashboard routes live under
(dashboard)and require a session
Adding a provider
Section titled “Adding a provider”Extend the socialProviders block in packages/auth/src/server.ts and add the matching env vars to .env.