ClouisleClouisle

Configure Single Sign-On

Configure OIDC, OAuth2, SAML 2.0, or CAS login connections

SSO connections are managed by a super administrator in Site settings > SSO. The fields for each connection depend on the protocol; prepare the identity provider's callback address, client credentials, and certificates/metadata before saving.

Callback Address

The callback address format is {API_BASE_URL}/api/v1/sso/callback/{provider_name}. The provider_name must match the name set in Clouisle; a mismatched callback address is the most common cause of SSO login failure.

Protocol Fields

OAuth2 / OIDC

FieldRequiredDescription
client_idYesClient ID from the provider
client_secretYesClient Secret from the provider
authorization_urlYesProvider authorization endpoint
token_urlYesToken exchange endpoint
userinfo_urlYesUser info endpoint
scopesNoSpace-separated scopes (default openid email profile)

Common provider endpoints: GitHub uses https://github.com/login/oauth/authorize / …/login/oauth/access_token / https://api.github.com/user; Google uses https://accounts.google.com/o/oauth2/v2/auth / https://oauth2.googleapis.com/token / https://openidconnect.googleapis.com/v1/userinfo.

SAML 2.0

FieldRequiredDescription
sp_entity_idYesService Provider Entity ID (your Clouisle instance identifier)
idp_entity_idYesIdentity Provider Entity ID
sso_urlYesIdP Single Sign-On URL
x509_certYesIdP X.509 certificate (PEM, without header/footer)
acs_urlYesAssertion Consumer Service URL ({API_BASE_URL}/api/v1/sso/callback/{provider_name})
slo_urlNoSP Single Logout URL
idp_slo_urlNoIdP Single Logout URL
name_id_formatNoNameID format (default urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified)

CAS

FieldRequiredDescription
server_urlYesCAS server base URL
service_urlYesService URL for CAS validation
versionNoCAS protocol version 1/2/3 (default 3)

Attribute Mapping

Attribute mapping maps provider user fields to Clouisle user fields: email, username, avatar_url. Use dot paths for simple nested objects:

{
  "email": "email",
  "username": "profile.name",
  "avatar_url": "profile.picture"
}

For complex structures (arrays, filters), use JSONPath expressions starting with $; when multiple values match, the first is used.

Admin Permissions and API

Listing providers requires admin:sso:read; creating, updating, deleting, testing providers, and disconnecting user SSO connections require admin:sso:update (the Admin role only has admin:sso:read by default; admin:sso:update is limited to Super Admin). The public endpoint GET /api/v1/sso/providers returns the enabled providers (for rendering login buttons).

GET    /api/v1/sso/admin/providers
POST   /api/v1/sso/admin/providers
PUT    /api/v1/sso/admin/providers/{provider_id}
DELETE /api/v1/sso/admin/providers/{provider_id}
POST   /api/v1/sso/admin/providers/{provider_id}/test

General Flow

  1. Enable SSO.
  2. Select the protocol and fill in the provider name, display name, and button text.
  3. Configure the client ID, client secret, Issuer/authorization endpoint, Token endpoint, user info mapping, or SAML metadata.
  4. Set the auto-creation, email matching, and approval policies.
  5. After saving, copy the callback address shown by Clouisle to the identity provider.
  6. In an incognito window, test new users, existing users, and failed callbacks.
SSO connection configuration
SSO connection configuration

User Lifecycle

  • When Auto-create is on, the first SSO login can create a user.
  • When Match by email is on, the SSO email can link to an existing account.
  • When Approval required is on, new accounts remain pending approval.
  • When Allow password login is off, the site enters SSO-only mode.

Common Errors

SSO_INVALID_CONFIGURATION (6304) means the configuration is missing or malformed; SSO_AUTHENTICATION_FAILED (6303) means the identity provider rejected the request or callback validation failed; expired sessions return 6301. Start by checking the Issuer, callback URL, clock, certificates, and email mapping.

How is this guide?

On this page