Sign-in per deployment

Platform > Organization > Access > Single sign-on. Shown with sample data.
Set up sign-in
Create a client at your identity provider
preferred_username (see Keycloak and preferred_username below).Enter it in xpander
Self-hosted: give the pods a path to the IdP
keycloak.internal.<domain> on an internal ingress class, resolved so the issuer hostname still matches. On Air-Gapped, also set the chart values below.Sign in
Air-Gapped chart values
Air-Gapped chart values
client-auth is published as client-auth.<domain> and also serves skill OAuth redirects. Google and GitHub social buttons are a separate path (GoTrue providers, supabase.auth.extraEnv in the chart).How a sign-in works
How a sign-in works
- The user clicks SSO and types their work email under Sign in with SSO. The email only picks the organization and is never sent to the IdP.
client-authredirects the browser to your IdP with scopesopenid profile emailplus any you add. The client is confidential (client_idandclient_secret, no PKCE).- The IdP redirects back to
https://<app-host>/oidc/<organization-id>/callbackwith a code. client-authexchanges the code and reads the user from the IdP’s userinfo endpoint, from inside the cluster.- xpander finds or creates the user by email in GoTrue and starts the session.

After the SSO button: the identity provider's own sign-in page, here Keycloak. Shown with sample data.
Keycloak and preferred_username
Keycloak and preferred_username
Unable to validate email address: invalid format. Map the email onto it:- Client scopes, the client’s dedicated scope, Add mapper, By configuration, User Property.
- Name
preferred_username, Propertyemail, Token Claim Namepreferred_username, type String, “Add to userinfo” on. - Retry the SSO sign-in.
email first, but add the mapper anyway: it works on every release.Running Keycloak yourself
Running Keycloak yourself
kcadm.sh (each call starts a second JVM). Install Keycloak after its database, role and admin secret exist, or the release deadlocks.Group sync with Keycloak
IdP groups map to xpander user groups:- Create a
groupsclient scope. Client scopes, Create client scope, namegroups, type Optional. Add a Group Membership mapper: namegroups, Token Claim Namegroups, Full group path off, Add to userinfo on. Then addgroupsto your xpander client as Optional. A mapper on the dedicated scope alone is not enough: Keycloak answerserror=invalid_scope. - Request the scope. Under Additional sign-in scopes, Add
groups, then Save configuration. xpander records claimgroupsfromuserinfo. - Sign in once, so xpander sees the group values.
- Link a group. Platform > Organization > Members & groups, the group’s menu, Link SSO groups. Pick a seen value or Add a group by name or ID with Add to list, then Save links. The row shows an SSO badge.

Link SSO groups, before the identity provider has sent any groups: add one by name or ID, then Save links. Shown with sample data.
GET /oidc/<org-id>/groups exists for Okta and Entra ID only. With Keycloak it answers 400, which is harmless.
Agent pre-authentication
Lets an agent act with the asking person’s own permissions where systems allow. At the moment of a call, xpander exchanges the person’s sign-in token (OIDC token exchange, RFC 8693) for a token scoped to the target system. Turn it on only after sign-in works.When it fails
Symptoms, causes and fixes
Symptoms, causes and fixes
client-auth pod (token and userinfo), the auth (GoTrue) pod (user creation) and the edge-runtime pod (oidc-callback).
