The Auth API covers two separate concerns: a single endpoint that tells the login page which Identity Providers are enabled, and the full set of session management routes owned by Better Auth. This page documents both, and explains the OAuth flow that allows users to sign in with Google Workspace, Microsoft Entra, or GitHub OAuth.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/org-quicko/skillset/llms.txt
Use this file to discover all available pages before exploring further.
Endpoints at a glance
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /api/auth/providers | None | List enabled Identity Providers |
| ALL | /api/auth/* | Varies | Better Auth session, sign-in, sign-out, and OAuth callbacks |
List enabled Identity Providers
Response fields
Enabled Identity Providers. Each entry has:
Better Auth routes (/api/auth/*)
All other routes under /api/auth/ are handled by Better Auth. These include:
- Sign in —
POST /api/auth/sign-in/email(password-based) - Sign out —
POST /api/auth/sign-out - OAuth redirect —
GET /api/auth/sign-in/:provider— initiates the OAuth dance - OAuth callback —
GET /api/auth/callback/:kind— receives the authorization code from the Identity Provider
<kind> is google, microsoft, or github depending on the provider.
OAuth sign-in flow
Initiate
The user clicks a sign-in button. The login page navigates them to
GET /api/auth/sign-in/:provider. Better Auth builds the authorization URL and redirects the browser to the Identity Provider.Provider login
The user authenticates with the Identity Provider (Google Workspace, Microsoft Entra, or GitHub). On success, the provider redirects the browser back to
<PUBLIC_URL>/api/auth/callback/<kind> with an authorization code.Password-based login is always available regardless of Identity Provider configuration. It is the recovery path if a provider’s client secret expires.
For Google Workspace and Microsoft Entra, a provider cannot be enabled without a permitted Workspace domain or Entra tenant ID. Any user whose account matches the configured domain or tenant automatically gets a Reader account on first sign-in.