Skip to main content
The SSO button on the login page is driven by the OIDC configuration an administrator enters in the app, not by GoTrue’s external providers. Google and GitHub social buttons are GoTrue providers (supabase.auth.extraEnv in the chart); SSO is a separate path, and this page is about that path.

How a sign-in works

  1. The user opens the login page, clicks SSO and types their work email. The email only picks the organization; it is never sent to the IdP.
  2. The client-auth component builds the authorization URL from the organization’s OIDC config and redirects the browser to your IdP. Scopes are openid profile email plus any extra scopes you add. The client is confidential: client_id and client_secret, no PKCE.
  3. Your IdP redirects back to https://<app-host>/oidc/<organization-id>/callback with a code.
  4. client-auth exchanges the code at the IdP’s token endpoint and reads the user from the IdP’s userinfo endpoint. Token and userinfo calls run from inside the cluster, so the IdP must be reachable from the pods, not only from browsers.
  5. The platform finds or creates the user by email in the in-cluster auth (GoTrue), then mints the session.

What to configure

In your identity provider

Create an OIDC client for xpander with: Keycloak and preferred_username. Keycloak’s default mapper puts the account username into preferred_username. Releases before the September 2026 edge-functions image use that claim as the email when it differs from email, which fails user creation with Unable to validate email address: invalid format. On those releases, add a mapper on the xpander client: Client scopes, the client’s dedicated scope, Add mapper, By configuration, User Property, with Name preferred_username, Property email, Token Claim Name preferred_username, type String, and “Add to userinfo” on. Realm-wide alternative: Realm settings, Login, “Email as username”. Later releases use email whenever it is an address and treat preferred_username only as a fallback, so the mapper becomes optional.

In xpander (Settings, OIDC)

In the chart

client-auth is one of the published hosts (client-auth.<domain>); it also serves connector OAuth redirects.

When it fails

Logs to read: the client-auth pod (token and userinfo exchange), the auth (GoTrue) pod (user creation), and the edge-runtime pod (the oidc-callback function).

Group sync and pre-authentication

Group membership from the IdP (groups claim or a directory lookup) can map to xpander user groups; agent pre-authentication lets agents obtain IdP tokens through token exchange. Both are configured in the same Settings, OIDC page and are optional. See the product updates for the current scope of group sync.