Included plugins
The schema and authentication capabilities come from Better Auth’s default models and three plugins that give a great foundation for a multi-tenant B2B SaaS application.Admin
The Admin plugin adds platform roles, user administration, bans, impersonation, and session management. SaaS Foundation extends its access control with the organization, member, invitation, and API key permissions used by the admin portal.Organization
The Organization plugin adds organizations, memberships, invitations, active organization sessions, and organization-level roles. These models and permissions form the foundation of the customer portal.API Key
The API Key plugin adds user-owned API keys and the fields needed for expiration, permissions, usage, and rate limits. SaaS Foundation allows API keys to create sessions and currently leaves their built-in rate limiting disabled. Together with email and password authentication, these plugins provide the baseline features that are useful in almost any multi-tenant B2B SaaS application. Better Auth offers many more plugins that you can add when your product needs them.A deliberate integration boundary
Better Auth includes client libraries and a broad collection of API endpoints. SaaS Foundation does not expose that entire surface to the frontend. It does not configure a Better Auth client service or mount the library’s catch-all API handler. Instead, the application defines its own focused routes undersrc/app/api/auth/.
The frontend calls those routes through the same typed API service pattern used
elsewhere in the application.
When the application calls Better Auth
Application routes call the Better Auth server API when the operation belongs to the authentication system. Examples include:- Signing in, signing out, and creating an account
- Reading and verifying sessions
- Changing and resetting passwords
- Setting the active organization
- Checking admin and organization permissions
- Starting and stopping impersonation
- Creating API keys