Auth0, Keycloak and generic OIDC
Seylo signs in from the browser: the client you create is a public one (single-page / browser type, authorization code with PKCE, no client secret). The Seylo page shows these steps for the provider you choose, with your values and Copy buttons, until it is configured.
Values you copy from Seylo
Section titled “Values you copy from Seylo”The same three values for every provider on this page:
| Value | Example | What it is |
|---|---|---|
| Sign-in redirect URI | https://portal.seylo.in/ |
Where the provider sends people back. Note the trailing /. |
| Origin | https://portal.seylo.in |
The provider must accept browser (CORS) requests from it. |
| Test sign-in redirect URI (optional) | https://portal.seylo.in/api/auth/sso/test/callback |
Only for Sign in for real on the Test tab. |
-
Create the application.
Auth0 Dashboard → Applications → Applications → Create Application, name
Seylo, type Single-Page Web Applications, Create. On its Settings tab:Auth0 field Value from Seylo Allowed Callback URLs the sign-in redirect URI (and the test one, after a comma) Allowed Web Origins the origin Allowed Origins (CORS) the origin Save Changes.
-
Put roles in the token. Auth0 has no roles claim of its own.
- Create roles under User Management → Roles → Create Role; assign them under User Management → Users → a user → Roles → Assign Role.
- Actions → Library → Create Action → Build from scratch, name
Seylo roles, trigger Login / Post Login, paste the code below, Deploy. - Actions → Flows → Login (newer dashboards: Actions → Triggers →
post-login): drag
Seylo rolesinto the flow, Apply.
exports.onExecutePostLogin = async (event, api) => {// One claim name - the whole URL. Auth0 requires custom claims to be namespaced.api.idToken.setCustomClaim("https://k8s-deployment-tool/roles", event.authorization?.roles ?? []);};
| Seylo field | Where it is in Auth0 |
|---|---|
| Auth0 domain | Settings → Domain, e.g. acme.us.auth0.com (or your custom domain if people sign in through it). |
| Client ID | Settings → Client ID. |
| Auth0 Organization ID (Advanced) | Only if one Auth0 tenant serves several companies through Organizations: the organisation’s org_... ID. Otherwise leave empty. |
Claim mapping: the role claim is the whole string
https://k8s-deployment-tool/roles (filled in already); map each Auth0 role
name, e.g. Seylo Admin = admin.
Keycloak
Section titled “Keycloak”-
Create the client.
Keycloak Admin Console → your realm → Clients → Create client.
- Client type OpenID Connect, Client ID
seylo. Next. - Capability config: Client authentication Off, Standard flow on, Direct access grants off, PKCE method S256. Next.
- Login settings: Valid redirect URIs = the sign-in redirect URI (and the test one); Web origins = the origin. Save.
- Client type OpenID Connect, Client ID
-
Put realm roles in the ID token.
Keycloak adds realm roles to the access token but not to the ID token by default, and Seylo reads the ID token. Client scopes → roles → Mappers → realm roles → switch Add to ID token on → Save.
Create roles under Realm roles → Create role and assign them under Users → a user → Role mapping → Assign role (or to a group).
| Seylo field | Where it is in Keycloak |
|---|---|
| Realm URL | https://<your Keycloak host>/realms/<realm>. Realm settings → General → Endpoints → OpenID Endpoint Configuration opens the discovery document; the realm URL is that address without /.well-known/openid-configuration. Keycloak 16 and older add /auth: https://sso.acme.example/auth/realms/acme. |
| Client ID | The Client ID from step 1, e.g. seylo. |
| Client secret | Leave empty — a public client has none. |
Claim mapping: realm roles are at the nested path realm_access.roles
(filled in already); client roles are at
resource_access.<client id>.roles. Map each role, e.g. seylo-admin = admin.
Any other OpenID Connect provider
Section titled “Any other OpenID Connect provider”- Create a client of the browser / single-page / public kind: authorization code flow with PKCE (S256), no client secret required. Register the sign-in redirect URI, and allow CORS from the origin to the token endpoint.
- Sign tokens with an asymmetric algorithm — RS256, PS256, ES256 or EdDSA. HS256 is refused: with it, the signing key is the client secret.
- Put roles or groups in the ID token and note the claim name.
| Seylo field | Where it comes from |
|---|---|
| Issuer URL | The iss value in your provider’s tokens, e.g. https://id.acme.example. Seylo appends /.well-known/openid-configuration to find the rest; the document must be served over https and must declare that same issuer. |
| Client ID | The client from step 1. |
| Role claim (Claim mapping) | The claim from step 3. A dotted path such as realm_access.roles reads a nested claim. |
If several of your organisations share one issuer, set a discriminator claim and value — otherwise the second registration cannot be told apart from the first, and Seylo refuses it rather than guess.
Claim shapes that work
Section titled “Claim shapes that work”For a role claim: an array (["releaser", "approver"]), a space- or
comma-delimited string ("releaser approver"), or a single value ("admin").
The discriminator is deliberately not split: "evil.example acme.example"
must not match acme.example.
If it fails
Section titled “If it fails”| What you see | What it means and what to do |
|---|---|
Callback URL mismatch (Auth0) / Invalid parameter: redirect_uri (Keycloak) |
Register exactly the sign-in redirect URI, including the trailing /. |
The browser could not call the provider's token endpoint |
The provider refuses browser requests from Seylo’s origin. Auth0: Allowed Web Origins and Allowed Origins (CORS). Keycloak: Web origins. |
The configured role claim "realm_access.roles" is NOT PRESENT in this token |
Keycloak: switch Add to ID token on for the realm roles mapper. |
Issuer mismatch |
The discovery document names a different issuer than the address it came from. Enter the issuer exactly as the document declares it. |
No tenant is registered for token issuer "..." |
The provider signs tokens with a different issuer than the one saved. Compare iss in the test report. |
FINAL: none - every action will be refused |
Sign-in worked, no role mapped. Add the values the report shows to the Role map, or set a Base role. |
Provider documentation used
Section titled “Provider documentation used”Checked on 2026-10-15: Auth0: single-page applications · Auth0: application settings · Auth0: write your first Action · Auth0: custom claims · Auth0: create roles · Keycloak: Server Administration Guide