Authentication

Platform~10 min

Multi-mode authentication system with configurable backends. Supports demo, password, Supabase, and custom API modes.

Read this when you need to set up authentication or understand the auth system.
Useful for developers configuring how users sign in to your application.

Choose Your Auth Mode

Pick the right authentication mode for your use case:

Demo

Any credentials work. Default mode for development and demos. No setup required.

Password

Single shared password. Protect staging sites or internal tools without user accounts.

Supabase

Full user management. Real accounts, registration, email verification, and password reset.

Custom

Your own API. Integrate with existing auth systems or third-party identity providers.

Detailed Mode Reference

For AI Agents

Key rules:

  • Check current mode with getAuthMode()
  • Use isRegistrationEnabled() to show/hide registration
  • Protected routes are in /app/* (subpages only)
  • Server-side auth functions are in @/lib/auth/server
  • Read lib/auth/LIB-AUTH.md for full API reference