Skip to content

Accounts and teams

Auth

Three ways in, all on one sign-in page, built on Better Auth with the Prisma adapter. Anonymous visitors to protected pages are redirected to sign-in, and signed-in users are sent away from it.

  • Better Auth

What you get

  • GitHub, Google and Discord OAuth, each enabled when its client id and secret are set
  • Email and password with verification on sign-up, plus forgot and reset password pages
  • Magic links, toggled in one config setting
  • Passwords of at least 10 characters
  • requireAuth() and getSession() helpers for server components

Turn it on

  • BETTER_AUTH_SECRET and BETTER_AUTH_URL
  • GITHUB, GOOGLE or DISCORD client id and secret, each optional
  • authConfig in config.ts

Where it lives

  • lib/auth.ts
  • lib/auth-client.tsx
  • lib/auth-utils.ts
  • proxy.ts
  • app/sign-in