FabricFabricExperiments
Platform

Auth and organizations

Better Auth powers sessions, organizations, API keys, magic links, OAuth, and 2FA.

Fabric Experiments uses Better Auth through packages/auth and apps/api/src/server/auth.ts.

Enabled capabilities:

  • email/password with required verification,
  • magic links,
  • Google and GitHub OAuth when env vars are present,
  • organization plugin,
  • API keys with rate limits,
  • admin plugin,
  • two-factor auth,
  • SAML configuration UI for enterprise orgs.

Important env vars

  • DATABASE_URL
  • BETTER_AUTH_SECRET
  • FX_BASE_URL
  • FX_TRUSTED_ORIGINS
  • RESEND_API_KEY and RESEND_FROM for real email delivery
  • GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET
  • GITHUB_CLIENT_ID / GITHUB_CLIENT_SECRET

Staging can log verification emails to stdout initially, but production should use a real email provider.

On this page