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_URLBETTER_AUTH_SECRETFX_BASE_URLFX_TRUSTED_ORIGINSRESEND_API_KEYandRESEND_FROMfor real email deliveryGOOGLE_CLIENT_ID/GOOGLE_CLIENT_SECRETGITHUB_CLIENT_ID/GITHUB_CLIENT_SECRET
Staging can log verification emails to stdout initially, but production should use a real email provider.