BetterStarter logoBetterStarter
Features

Authentication

Email OTP and Google OAuth authentication powered by Better Auth.

Docs are in beta — content is improving rapidly. Found something missing? Open an issue on GitHub or reach out on Twitter.

BetterStarter uses Better Auth — a self-hosted, open-source auth library with full TypeScript support.

What's Included

  • Email OTP — users sign in with a 6-digit code sent to their email. No passwords.
  • Google OAuth — one-click sign-in with Google
  • Session management — 30-day sessions with daily refresh (users stay logged in indefinitely while active)
  • Type-safe client and server — full TypeScript types for user, session, and auth state

Sessions

Sessions expire after 30 days of inactivity. Each request refreshes the session expiry, so active users stay logged in.

User signs in → session expires in 30 days
User visits next day → session refreshed, expires in 30 days from today
No activity for 30 days → session expires, user must sign in again

Configuration

Auth is configured in src/lib/auth/index.ts. The emailOTP plugin calls sendOTPEmail to deliver codes via Plunk.

Guides

On this page