Compartment supports OIDC-based single sign-on so your team can authenticate with an existing identity provider instead of managing separate credentials. You configure SSO providers per organization, and members sign in using the button that appears on the Compartment login page.Documentation Index
Fetch the complete documentation index at: https://docs.compartment.dev/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- You must be logged in as an organization admin:
compartment login - You need a registered application (client) in your identity provider with a client ID and client secret
- Your OIDC provider must support the
openidscope — this is required for all configurations
Add a Google provider
Google is a supported preset that pre-fills the issuer URL and default scope. You only need your OAuth 2.0 client credentials from the Google Cloud Console:google preset defaults to the openid email profile scope. If you need a different scope, pass --scope explicitly — it must include openid:
Google as the button label on the login page by default. Customize it with --button-text:
Add a generic OIDC provider
For any OIDC-compliant provider (Okta, Auth0, Microsoft Entra, Keycloak, and others), use thegeneric preset. You must also supply --issuer-url and --display-name:
--issuer-url is the base URL of the OIDC discovery document. Compartment fetches <issuer-url>/.well-known/openid-configuration to resolve endpoints automatically.
--display-name is shown as the button label on the Compartment login page and in compartment sso oidc list output.
--scope defaults to openid email profile if omitted. Override it when your provider needs a specific set of scopes — openid must always be included:
Provider presets compared
| Option | google | generic |
|---|---|---|
--issuer-url | Pre-filled | Required |
--display-name | Optional (defaults to Google) | Required |
--scope | Optional (defaults to openid email profile) | Optional (defaults to openid email profile) |
--button-text | Optional | Optional |
List configured providers
update and remove.
Update a provider
Pass the provider ID fromcompartment sso oidc list and re-supply all fields you want to change:
update replaces the stored configuration for that provider. Fields you omit are cleared, so always pass the full set of options you want to keep.
Remove a provider
Advanced: custom identity verification claims
By default, Compartment reads the user’s email address and verification status from the standardemail and email_verified claims in the ID token. If your provider uses non-standard claim names, you can override them.
- Custom email claim
- Custom verified-email claim
- Require a specific claim value
<source>:<claim>, where <source> is either id-token (or id_token) for the OIDC ID token, or userinfo for the userinfo endpoint. Multiple claims can be provided as a comma-separated list.
Next steps
- Manage team members and roles — see Users and roles.
- Combine SSO with a custom domain so your login page uses your own URL — see Custom domains.