Self-host

Supabase auth

V5_AUTH_MODE=supabase for multi-user cloud. Never put the service role in the browser.

Flip the mode

Set V5_AUTH_MODE=supabase and point both the API and the Next app at the same project. The dashboard uses @supabase/ssr. The API validates JWTs from that project.

Keys

  • NEXT_PUBLIC_SUPABASE_ANON_KEY / SUPABASE_ANON_KEY — publishable. Fine in the browser.
  • SUPABASE_SERVICE_ROLE_KEYserver only. Never prefix with NEXT_PUBLIC_.

Something off? Open an issue · Edit on GitHub