Authorization: Bearer <token> header. Tokens are signed with RS256 and verified against the Keycloak JWKS endpoint derived from the token’s iss claim.
The platform supports three authentication methods: Supabase-backed email/password (primary), Keycloak SSO (for multi-client deployments), and FIDO/WebAuthn passkeys. All methods ultimately produce a Keycloak-issued JWT.
Registration and login flow
1
Request a verification email
Send the user’s email address to receive a one-time verification code.An optional
clientAlias query parameter targets a specific SSO client. If omitted, the default client is used.2
Verify the email address
Confirm the verification code delivered to the user’s inbox.
curl
3
Complete registration
Submit the user’s profile details to create the account.
curl
4
Sign in
Exchange credentials for a JWT access token and a refresh token.
5
Call protected endpoints
Include the token in the
Authorization header for every subsequent request.curl
Token refresh
Access tokens expire after the duration specified inexpires_in (seconds). Use the refresh token returned at sign-in to obtain a new access token without requiring the user to re-authenticate.
Sign out
Invalidate the current session server-side. Requires a valid Bearer token.curl
Password reset
- Forgot password
- Reset with token
- Reset while authenticated
Request a password-reset link sent to the user’s email.
curl
Auth providers
- Supabase
- Keycloak SSO
- FIDO / WebAuthn
Supabase is the primary identity backend. The platform uses
SUPABASE_URL, SUPABASE_KEY, and SUPABASE_JWT_SECRET to verify tokens and manage user records.Set these three variables in .env:.env
Multi-client SSO (clientAlias)
The platform can serve multiple front-end clients from a single backend. Each client has its own Keycloak management credentials and post-login redirect domain. The clientAlias concept ties a request to a specific client.
How it works:
SUPPORTED_SSO_CLIENTSlists all enabled client names (comma-separated).- For each name, four environment variables are expected:
{NAME}_CLIENT_ALIAS— short alias token{NAME}_DOMAIN— post-login redirect URL{NAME}_KEYCLOAK_MANAGEMENT_CLIENT_ID— encrypted client ID{NAME}_KEYCLOAK_MANAGEMENT_CLIENT_SECRET— encrypted client secret
- The
GET /auth/clientAliasesendpoint returns all configured aliases and their domains. - Auth endpoints that accept a
clientAliasquery parameter (e.g.,POST /auth/verification-mail) use the alias to select the correct Keycloak client for the operation.
.env
CREDEBL_KEYCLOAK_MANAGEMENT_CLIENT_ID and _SECRET values must be encrypted using CRYPTO_PRIVATE_KEY before being stored in .env. Use the same encryption key as configured in the Studio UI.Session management
The platform tracks sessions server-side. Asid claim in the JWT is validated against the session store on every authenticated request (see JwtStrategy.validate). A token whose session has been revoked is rejected with 401 Unauthorized.
Users can only view and revoke their own sessions. Attempting to access another user’s sessions returns
403 Forbidden.