Keycloak OpenID Connect Identity Verification: Didit Scopes and Claims
Didit runs as an OpenID Connect authorization server for Keycloak: scopes release specific claims, a mismatch returns access_denied, review returns pending, and you pay $0.33 per full ID check.

Contents
In this guide
Jump to the part you need.
Keycloak does not verify identity itself. Didit runs the check as an OpenID Connect authorization server: the broker sends the user, Didit verifies them, and the claims come back in a signed ID token. It fits teams that already broker logins through Keycloak. You pay $0.33 per full ID check at the published list price; check the current pricing page for applicable charges. The caveat: claims are released per scope, and Didit enables the OpenID Connect profile per client, not through a self-serve toggle.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
| Item | What you get |
|---|---|
| Profile | OpenID Connect profile, the one for brokers and relying parties, not the Okta or Auth0 profile |
| Authorization request | Plain authorization request or pushed authorization request (PAR, RFC 9126) |
| PKCE | S256, required unless Didit turns it off for a confidential client |
| Baseline scopes | openid profile identity_assurance, with document, address, email and phone claims depending on the workflow |
| Verification not approved | error=access_denied on your redirect URI, no code issued |
| Manual review | A pending result carrying verification_status, never a failure |
| ID token signing | RS256, verified against the JWKS endpoint |
| Access token | Valid for one hour, accepted only by UserInfo |
| Base URL | https://apx.didit.me/auth/idv for production and sandbox alike |
| Price | $0.33 per full ID check at the published list price; check the current pricing page for applicable charges |
Start free in the sandbox at business.didit.me; there is no sales call. Developers who want Didit inside an AI assistant can connect the hosted server through MCP setup for every client. Check Didit pricing before you size the budget.
What the Didit OpenID Connect profile returns
Didit's identity verification bridge is an OpenID Connect authorization server. It runs a Didit verification whenever your identity platform asks for one and returns the result as a signed ID token. We run identity and fraud checks for 4,000+ companies, and this bridge is one of the ways those checks reach a login. It speaks two profiles. Keycloak uses the standard OpenID Connect profile: broad claims, top level, released per scope. The Okta and Auth0 profile is the other one, and its verified_claims block with trust_framework IDV-DELEGATED is documented separately in Okta, Auth0 and OpenID Connect identity verification.
The profile is not a self-serve switch. Didit enables one profile for each client when it enables the integration, and it issues the dedicated client secret at the same time. Ask for the OpenID Connect profile explicitly, because the Okta and Auth0 profile pushes a different authorization request and returns a different token shape.
Four behaviours matter when you wire it into a broker.
- Plain authorization request or PAR. With the OpenID Connect profile, your broker can send its parameters straight to
GET /authorizewith itsclient_id. The document comparison still happens against the claims you name. - PKCE is
S256, required unless Didit turns it off for a confidential client. Send a challenge by default. - A mismatch ends the flow. When the verified identity does not match the claims you pushed, Didit redirects to your
redirect_uriwitherror=access_deniedand no code. - Manual review is not a failure. A session that goes to review comes back as a pending result carrying
verification_status. The strings are the ones in Verification Statuses.

Claims: the baseline scopes and what they release
Didit documents the authorization request for the bridge with the scopes openid profile identity_assurance. That is the baseline. openid carries the subject identifier and the verification status, profile carries name, date of birth, gender and nationality, and identity_assurance is included in the documented baseline scope request.
Document, address, email and phone claims are among the claims the OpenID Connect profile can release, but they depend on the workflow you configure and on the claims you request. A claim your workflow never collects cannot come back, so treat the baseline as the floor and the rest as configuration.
| Claim | What it carries | Keycloak destination |
|---|---|---|
sub | Stable subject identifier for the verified person | Broker user id |
verification_status | Result of the verification, including pending | User attribute, readable by a client mapper |
verification_session_id | Identifier of the Didit verification session behind the login | User attribute, used to retrieve the session decision |
verified_at | Timestamp of the completed verification | User attribute |
name, given_name, family_name | Name as read from the document | First and last name mappers |
birthdate | Date of birth | User attribute, drives age rules |
gender | Gender as recorded on the document | User attribute |
nationality | Nationality | User attribute |
| Document claims: type, number, issuing country, expiry | Document data from the ID check | User attributes, kept out of tokens your apps log |
address | Address, when the workflow collects a proof of address | User attribute or address fields |
email, phone | Contact claims, when the workflow collects and verifies them | User attributes |
Ask only for what a mapper will read. A claim you request and never map is data you store without a purpose, and a document number in an application log is a liability.
Prerequisites
| Requirement | Detail | Where it comes from |
|---|---|---|
| Didit plan | Any plan. Free includes $10 of monthly credit for eligible organizations. Sandbox testing is free and unlimited. | didit.me/pricing |
| Didit application and workflow | One application per environment, with the workflow that defines the steps the user completes. | Create Session API |
| OpenID Connect profile enabled | Didit enables one profile per client. Ask for the OpenID Connect profile, not the Okta or Auth0 one. | Didit docs |
| Client credentials | A dedicated client secret, shown once. It authenticates at PAR and the token endpoint. Your application API key is not accepted in its place. | Issued by Didit |
| Registered redirect URI | Keycloak's broker endpoint, character for character. A trailing slash, extra path segment or query string makes it a different URI. | Your Keycloak realm |
| Keycloak | A realm where you can add an identity provider of type OpenID Connect v1.0. | Your Keycloak administrator |
Step by step: Didit behind Keycloak
Didit documents the OpenID Connect profile and its endpoints. It does not publish a Keycloak-specific connector page, so the route below configures Keycloak as a standard OpenID Connect identity provider using the values Didit publishes.
1. Ask Didit to enable the OpenID Connect profile and issue the client secret
The profile is enabled per client, and the dedicated secret is shown once. Store it in Keycloak's secret store, not in a repository. A replaced secret keeps working for a 24-hour grace period after a rotation, so a switch does not need downtime.
2. Read the discovery document
curl https://apx.didit.me/auth/idv/.well-known/openid-configuration
It advertises the PAR, authorization, token, UserInfo and JWKS endpoints. Production and sandbox share the same base URL; the credentials you use decide which environment answers.
3. Register the exact redirect URI
In Keycloak, open the realm, go to Identity providers, add a provider of type OpenID Connect v1.0, and copy the redirect URI Keycloak displays. Send that string to Didit as the registered redirect URI. Every request must repeat it exactly.
4. Paste the Didit endpoints into the Keycloak provider
| Keycloak field | Value |
|---|---|
| Alias | didit |
| Client ID | your Didit client_id |
| Client secret | the dedicated integration secret |
| Authorization URL | https://apx.didit.me/auth/idv/authorize |
| Token URL | https://apx.didit.me/auth/idv/token |
| UserInfo URL | https://apx.didit.me/auth/idv/userinfo |
| JWKS URL | https://apx.didit.me/auth/idv/jwks |
| Issuer | the issuer string in the discovery document |
| Default scopes | openid profile identity_assurance |
Client authentication is client_secret_basic or client_secret_post.
5. Send the authorization request
With PAR, push the request first. The request_uri that comes back is single use and lives 60 seconds.
curl -X POST https://apx.didit.me/auth/idv/par \
-u "$CLIENT_ID:$CLIENT_SECRET" \
-d response_type=code \
-d redirect_uri=$REDIRECT_URI \
-d scope="openid profile identity_assurance" \
-d state=$STATE \
-d nonce=$NONCE \
-d code_challenge=$CHALLENGE \
-d code_challenge_method=S256 \
-d claims='{"id_token":{"given_name":{"value":"Lucas"},"family_name":{"value":"Fraggioli"}}}'
Then redirect the browser to GET /authorize?request_uri=.... A broker that sends a plain authorization request puts the same parameters on GET /authorize with its client_id and skips the PAR call.
The claims you name are what Didit compares against. Both given_name and family_name are supported and both are always compared fuzzily. Didit also documents the verified_claims array form, which is the shape the Okta and Auth0 profile returns.
6. Exchange the code and verify the ID token
curl -X POST https://apx.didit.me/auth/idv/token \
-u "$CLIENT_ID:$CLIENT_SECRET" \
-d grant_type=authorization_code \
-d code=$CODE \
-d redirect_uri=$REDIRECT_URI \
-d code_verifier=$VERIFIER
Verify the ID token's RS256 signature against the JWKS endpoint, check the nonce, and check that sub is stable. The authorization code is valid for 5 minutes and can be used once, so exchange it on receipt.
7. Call UserInfo when you need a fresh read
curl https://apx.didit.me/auth/idv/userinfo \
-H "Authorization: Bearer $ACCESS_TOKEN"
The access token is valid for one hour and is accepted only by UserInfo, sent in the Authorization: Bearer header or the access_token form field of a POST. One implementation approach is to re-read verification_status from UserInfo while a session sits in review. The docs specify UserInfo availability but do not prescribe polling.
Field and event mapping
The bridge delivers through the ID token and the UserInfo response. Didit does not describe webhooks as the bridge's delivery route; webhooks belong to the underlying Didit session, and the decision object they carry is documented in Retrieve Session API and Webhooks. If you also hold the session id, that is where document, liveness and face match detail lives.
verification_status rather than an error.| Outcome | What you receive | What Keycloak should do |
|---|---|---|
| Approved | One-time code and the original state, then an ID token with the claims for your scopes | Exchange the code, verify the signature, create or link the account |
| Not approved | error=access_denied on the redirect URI, no code | Show a retry path, create nothing |
| In review | A pending result carrying verification_status | Hold the account, poll UserInfo with a fresh token |
Test with sandbox data, then handle the three outcomes
Sandbox and production share the endpoints. The application behind your client credentials decides the environment, so use separate credentials and a workflow from the sandbox application. The sandbox is free and unlimited, and sandbox scenarios let you arm a specific outcome. See Sandbox and Test Data.
Arm a documented sandbox scenario, then inspect the broker response. Handle error=access_denied on the redirect as a separate branch. When Didit returns a pending result, read verification_status and keep verification pending.
- Success. The user finishes the flow, Didit redirects to your
redirect_uriwith a one-timecodeand your originalstate, and the token response carries an ID token with an RS256 signature and the claims for your scopes.verification_statusreports the verification as approved. - Mismatch. The verified identity does not match the claims you pushed. Didit redirects with
error=access_deniedand issues no code. There is no partial success to handle. - Review. The session is flagged for manual review. The result is pending and carries
verification_status. Never render it as a decline; render it as pending and poll UserInfo.
Error cases and fixes
| Symptom | Cause | Fix |
|---|---|---|
error=access_denied on the redirect URI, no code | Verified identity did not match the pushed claims | Do not create or link the account. Read state and offer a retry. |
| Redirect URI rejected | Trailing slash, extra path segment or query string | Send the registered string byte for byte. |
| PKCE rejected | No challenge, or a method other than S256 | Send an S256 challenge. Ask Didit to turn PKCE off only if you rely on the confidential client exception. |
request_uri not found | The PAR handle lived 60 seconds | Push a new PAR request. |
| Code rejected | It is valid 5 minutes and single use | Exchange immediately and never replay it. |
| User never arrives | The user has 15 minutes from the authorization request | Restart the authorization request. |
| Token endpoint rejects the client | The application API key was used as the client secret | Use the dedicated integration secret. |
The wider error vocabulary, with HTTP codes and retry guidance, is in Didit API Errors.
Disconnecting
Remove the identity provider from the Keycloak realm, or set it to disabled, and the broker flow stops. Ask Didit to disable the profile for your client, and rotate the secret so the old one is dead after its 24-hour grace period.
What it costs on both ends
On the Didit side you pay for the verification. A full ID check is $0.33 at the published list price: ID document verification $0.15, passive liveness $0.10, face match 1:1 $0.05 and device and IP analysis $0.03. Check the current pricing page for applicable charges. If your workflow also runs AML screening, add $0.20 per check.
Plan discounts apply to every Didit price: Growth is 4% off, so $0.3168 per full ID check, and Scale is 10% off, so $0.297. Growth is $99 a month with $115 of monthly credit; Scale is $299 a month with $350.
On the Keycloak side, the broker is open source software. This page does not price the infrastructure you run it on. Your cost there is compute and the operational work of running a realm.
Worked example: 5,000 verifications a month
Pay as you go, at list price: 5,000 x $0.33 = $1,650.00 of usage. There is no plan fee, so that is also the cash paid before any eligible Free-plan monthly credit: $1,650.00 - $10.00 = $1,640.00 if your organization qualifies for it.
Growth: 5,000 x $0.3168 = $1,584.00 of usage. The $115 monthly credit is applied to usage first, so cash for usage is $1,584.00 - $115.00 = $1,469.00. Add the $99.00 monthly fee, which the credit does not cover: $1,469.00 + $99.00 = $1,568.00 of cash paid.
Scale: 5,000 x $0.297 = $1,485.00 of usage. Credit of $350.00 against usage leaves $1,485.00 - $350.00 = $1,135.00. Add the $299.00 monthly fee: $1,135.00 + $299.00 = $1,434.00 of cash paid.
At this volume both plans land below the $1,650.00 list figure because the discount and the credit together outweigh the plan fee. The credit is a monthly allowance applied to usage, not a reduction of the plan fee, and unused credit does not roll over. Run your own volume in the estimator on the pricing page before you commit.
Sources
- Didit docs: Okta, Auth0 and OpenID Connect identity verification
- Didit docs: Verification Statuses
- Didit docs: Sandbox and Test Data
- Didit docs: Didit API Errors
- Didit docs: Webhooks
- Didit docs: Create Session API
- Didit docs: Retrieve Session API
- Didit pricing and pricing in the docs, checked November 26, 2026
- Didit MCP server
Next step: create a free account at business.didit.me, run one sandbox verification, and ask us to enable the OpenID Connect profile for your client. No sales call.
Try it
Try this in the sandbox
Run the check this guide describes, free.
The product this post is about, taken from its topic. Run it free in the sandbox.
Author
Alberto Rosas
Co-founder and CEO

Questions
Frequently asked questions
Can Keycloak use Didit as an OpenID Connect identity provider?
Yes. Didit's identity verification bridge runs as an OpenID Connect authorization server and publishes a discovery document plus authorization, token, UserInfo and JWKS endpoints for any relying party or identity broker. Keycloak uses the standard OpenID Connect profile, which returns top-level claims released per scope. Didit enables that profile per client when it enables the integration.
Which scopes should I request for Keycloak?
Start with openid profile identity_assurance, the baseline named in Didit's documented authorization request. Document, address, email and phone claims come back only when your configured workflow collects them and your request names them. Ask only for what a mapper will read.
What happens in Keycloak if the verified identity does not match?
Didit returns the user to your redirect_uri with error=access_denied and no authorization code. There is no ID token to inspect and no partial result. Your broker should show a retry path and must not create or link an account on that branch.
Does a manual review come back as a failure?
No. Under the OpenID Connect profile a session in review returns a pending result carrying verification_status, never a failure. Only the Okta and Auth0 profile collapses a review into FAILED after an optional wait. Render pending as pending.
Do I need PKCE with a confidential Keycloak client?
PKCE S256 is required unless Didit turns it off for a confidential client. That exception is configured on Didit's side, not yours, so send the challenge unless you have been told otherwise, and send the code_verifier with the token request.
How long do the tokens and codes last?
The authorization code is valid for 5 minutes and is single use. A PAR request_uri is single use and valid for 60 seconds, the user has 15 minutes from the authorization request to finish, and the access token lasts one hour for UserInfo only.
How do I verify the ID token signature?
ID tokens are signed with RS256. Fetch the keys from https://apx.didit.me/auth/idv/jwks, match the key by kid, verify the signature, then check the nonce and the issuer from the discovery document. Set the JWKS URL on the Keycloak provider so Keycloak can fetch those keys.
Can I use a plain authorization request instead of PAR?
Yes, on the OpenID Connect profile. Send the same parameters to GET /authorize with your client_id and repeat the redirect_uri at the token endpoint. PAR is the only option on the Okta and Auth0 profile, so pick the profile before you design the flow.
How much does each Keycloak verification cost?
You pay the normal check price: $0.33 for a full ID check made of ID document verification $0.15, passive liveness $0.10, face match 1:1 $0.05 and device and IP analysis $0.03, at the published list price; check the current pricing page for applicable charges. Growth takes 4% off, so $0.3168, and Scale 10%, so $0.297.
How do I test the Keycloak integration without real documents?
Use sandbox credentials and a sandbox workflow. Production and sandbox share the same endpoints, and the application behind your client credentials picks the environment. Sandbox scenarios let you arm an outcome, and sandbox testing is free and unlimited.
Can I keep Didit's own session data alongside the broker?
The bridge returns claims through the ID token and UserInfo. If you also hold the underlying session id, retrieve the full decision from the session API and read the status strings from the verification statuses reference. That gives you document, liveness and face match detail the token does not carry.
Compliance built in
Audited, certified and attested.
We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center
- Regulation encoded into your flows
Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.
- Ready for AMLR
Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.
- Tested in Spain's Treasury sandbox
Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.
- Audited, not self-declared
iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.
Your obligations · 3 regions
SOC 2 Type 2
ISO 27001
iBeta Level 1 and Level 2
EU regulator attestation
FSM youth protection
GDPR
EBA remote onboarding
MiCA compatible
FIDO Alliance member
- AMLREU AML Regulation ready
Integration · Didit MCP
Run Didit from your own AI agent
Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.
- Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
- Run investigationsAsk why a session was declined, review cases, search people and companies.
- Change rulesCreate payment rules, test them on past data and switch them on.
- Pull reportsAsk for numbers, exports or the audit log.
Didit Academy

