Authentication¶
Supported Login Modes¶
BabelSuite currently supports:
- local email and password authentication
- direct OIDC single sign-on
The frontend reads auth configuration from the backend, so sign-in pages can hide or show local login and SSO options dynamically.
Local Auth¶
The auth handler supports:
- sign up
- sign in
- current session lookup
The control plane seeds the initial admin account from:
ADMIN_EMAILADMIN_PASSWORD
Local auth can be toggled with:
AUTH_PASSWORD_LOGIN_ENABLEDAUTH_SIGNUP_ENABLED
OIDC¶
The current OIDC flow is:
- single provider
- direct browser login
- PKCE-enabled
- state cookie protected
- local JWT issued after callback
- group claim mapping for admin elevation
Important environment variables include:
OIDC_ENABLEDOIDC_PROVIDER_IDOIDC_PROVIDER_NAMEOIDC_ISSUER_URLOIDC_CLIENT_IDOIDC_CLIENT_SECRETOIDC_REDIRECT_URLOIDC_FRONTEND_CALLBACK_URLOIDC_SCOPESOIDC_PKCE_ENABLEDOIDC_EMAIL_CLAIMOIDC_NAME_CLAIMOIDC_GROUPS_CLAIMOIDC_ADMIN_GROUPSAUTH_STATE_SECRET
Session Model¶
After successful local auth or OIDC login, the backend issues a local JWT for the frontend session.
Protected routes use middleware that:
- verifies the token
- populates session context
- supports query-token access where streaming endpoints need it
Frontend Auth Routes¶
/sign-in/sign-up/forgot-password/auth/callback
Auth API Endpoints¶
Public:
GET /api/v1/auth/configPOST /api/v1/auth/sign-upPOST /api/v1/auth/sign-inGET /api/v1/auth/sso/providersGET /api/v1/auth/oidc/loginGET /api/v1/auth/oidc/callback
Protected:
GET /api/v1/auth/me
Legacy short paths under /auth/* are also registered.