Auth0 Post-Login Action with Didit IDV: Step-by-Step
Didit runs as an OpenID Connect bridge for Auth0 post-login Actions, requiring a Didit check after Auth0 authenticates the user. PAR only, PKCE S256, a 5-minute single-use code, and FAILED when a review is open.

Contents
In this guide
Jump to the part you need.
This guide is for teams on Auth0 that want a Didit identity check inside a post-login Action: the check runs after Auth0 authenticates the user and before the login completes. The Okta and Auth0 profile pushes every request through PAR and returns verified claims in the ID token. A workflow that runs a full KYC check costs $0.33 per completed check at list price. The caveat: if a review reverses an approval before redemption, the token returns FAILED.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
| Item | What it is |
|---|---|
| Didit profile | Okta and Auth0 profile, the delegated contract Okta Identity Engine uses for bring-your-own identity verification vendors |
| Authorization request | Pushed Authorization Request only (PAR, RFC 9126) |
| PKCE | Required, method S256 |
| Base URL | https://apx.didit.me/auth/idv, the same for production and sandbox |
| User window | 15 minutes from the authorization request to finish the verification |
| Authorization code | Valid for 5 minutes once issued, single use |
| ID token result | verified_claims with trust_framework IDV-DELEGATED and assurance_level VERIFIED or FAILED |
| Price | $0.33 per completed full KYC check at list price, $0.3168 on Growth, $0.297 on Scale |
Start free in the sandbox at https://business.didit.me/, no sales call needed, and run the whole flow against simulated outcomes before you spend anything. If you build with an AI assistant, connect Didit to it through the Didit MCP server.
What this integration actually does
We run an OpenID Connect authorization server that performs a verification whenever your identity platform asks for one, then returns the verified identity in a signed ID token. Teams use the post-login Action to require a Didit identity verification check after Auth0 authenticates the user and before the login completes. The Action does not replace the initial login. The recommended method is this documented bridge, not a session you build and poll yourself, because the bridge already handles the claim comparison, the signed token and the review wait.
The bridge also speaks a plain OpenID Connect profile for identity brokers and relying parties such as Keycloak. This guide uses the Okta and Auth0 profile for the post-login Action. That profile requires PAR and PKCE with S256 and compares given_name and family_name fuzzily. For a completed verification that is not approved, Didit returns an authorization code to the registered callback. Redeeming that code returns an ID token with assurance_level set to FAILED.
One consequence is worth repeating to your product team: a FAILED result is not an OAuth error. The token request succeeds. The Action has to read the assurance level and decide whether the person gets in.

The handoff at a glance
| Who | What happens |
|---|---|
| Action, server side | Pushes the authorization request to POST {base}/par with the PKCE challenge, state, nonce, the registered redirect_uri, the scopes and the claims. We return a single-use request_uri valid for 60 seconds. |
| Browser | Goes to GET {base}/authorize?request_uri=.... No Didit secret ever reaches it. |
| Didit | Creates the verification session and runs the hosted flow for the user. |
| Your registered callback | Receives a one-time code and the original state from us, and must carry both into the Action continuation that started this login attempt. |
| Action, server side again | Compares the returned state, then redeems the code at POST {base}/token with the original code_verifier. |
| Access decision | Made after full ID token validation and the assurance check, never before. |
The endpoints you will call
| Purpose | Endpoint |
|---|---|
| Pushed Authorization Request | POST {base}/par |
| Authorization | GET {base}/authorize |
| Token | POST {base}/token |
| UserInfo | GET or POST {base}/userinfo |
| JWKS | GET {base}/jwks |
| Discovery | GET {base}/.well-known/openid-configuration |
Client authentication uses client_secret_basic or client_secret_post. The discovery document at {base}/.well-known/openid-configuration advertises every endpoint above.
Prerequisites
- A Didit account with an application and a KYC workflow. Every application comes as Live and Sandbox; see Applications in the Didit Console.
- Client credentials for the integration: a
client_idand a dedicated client secret that we issue when we enable the profile for your client. We show the secret once, when it is issued. - The exact redirect URI you will register, character for character. A trailing slash, an extra path segment or a query string makes it a different URI.
- An Auth0 tenant with Actions enabled, a post-login Action, and Action secrets where the client secret can live.
- A way to correlate the callback with the original login attempt. The
state, thenonceand the PKCEcode_verifiermust remain available securely through that attempt; how you keep them is your design decision.
The integration in eight steps
These steps describe the Didit bridge contract. Where a step needs glue on the Auth0 side, such as the callback route and the continuation that hands code and state to the Action, the Didit documentation does not prescribe the wiring, so read them as the contract your Action must satisfy rather than a deployable Action you can paste.
Step 1. Create the workflow and pick the environment
Build a KYC workflow in the Didit Console and test it in Sandbox first. Production and sandbox use the same endpoints, so the credentials decide which environment a request lands in. Keep one set of credentials per environment, tied to a workflow that belongs to the matching application. Sandbox testing is free on every plan.
Step 2. Register the redirect URI exactly
Register the exact URI that will receive our redirect as a redirect URI for the Didit client. The redirect_uri of every request must be exactly one of the registered URIs: a trailing slash, an extra path segment or a query string makes it a different URI and the request is rejected. In this guide the value is written as https://YOUR_AUTH0_DOMAIN/YOUR_REGISTERED_CALLBACK, a placeholder for your own registered URI, not a working Auth0 path.
Step 3. Store the dedicated client secret
We issue a dedicated client secret when we enable the integration and show it once, at that point. Store it in your identity platform's secret store: it authenticates your client at the PAR and token endpoints and has no other use. The application's API keys are not accepted as the client secret of an integration that has its own secret. We can rotate the secret on request, and the replaced secret keeps working for a grace period of 24 hours unless you ask for another one, so you can switch without downtime.
Integrations set up before dedicated secrets existed authenticate with the application's Primary API key. They keep working until we issue them a dedicated secret; from then on only the new secret is accepted.
Step 4. Generate state, nonce and the PKCE challenge
Create a state, a nonce and a PKCE verifier for each login attempt, and derive the code_challenge with method S256. Do this immediately before the push: the request_uri that PAR returns is valid for 60 seconds and can be used once. Because the callback has to be correlated with the original login attempt, the original nonce and the PKCE code_verifier must stay available securely through that attempt and be read back when the code returns.
Step 5. Push the authorization request to PAR
Push the request from the first execution of the post-login Action, server side, with the documented inputs: the registered redirect_uri, the scopes openid profile identity_assurance, state, nonce, code_challenge with code_challenge_method=S256, and the claims parameter. Authenticate with client_secret_basic or client_secret_post. The response carries a single-use request_uri valid for 60 seconds.
Send the claims to compare inside the standard OpenID Connect claims parameter, as a verified_claims array:
{
"id_token": {
"verified_claims": [
{
"verification": {
"trust_framework": { "value": "IDV-DELEGATED" },
"assurance_level": { "value": "VERIFIED" }
},
"claims": {
"given_name": { "value": "Lucas", "fuzzy": true },
"family_name": { "value": "Fraggioli", "fuzzy": true }
}
}
]
}
}
Step 6. Send the browser to the authorization endpoint
Redirect the user's browser to the authorization endpoint with the request_uri. We create the verification session and send the person into the hosted flow. The user has 15 minutes from the authorization request to complete verification.
GET https://apx.didit.me/auth/idv/authorize?request_uri=REQUEST_URI
Step 7. Receive the code and state at your callback
When the user finishes, we evaluate the decision, compare the extracted identity against the claims that were pushed, and return the browser to your registered redirect_uri with a one-time code and the original state. Your side receives that redirect, not the Action directly, so the callback you registered has to carry the code and state into the Action continuation that started this login attempt. The Didit documentation does not define an Auth0 callback path or a continuation mechanism, so that route is yours to build. Before anything is redeemed, compare the returned state with the value stored for the original Didit request and stop if they differ. For a completed verification that is not approved, Didit returns an authorization code to the registered callback. Redeeming that code returns an ID token with assurance_level set to FAILED. If the verification times out and your callback has no valid authorization code, stop the login attempt and start a fresh authorization request.
Step 8. Redeem the code and validate the ID token
Authenticate the client at POST {base}/token and exchange the authorization code with its original code_verifier. The code is valid for 5 minutes once it is issued and can be used once, so an expired or already redeemed code fails. Then validate the ID token in full before you read anything from it: the RS256 signature against the JWKS endpoint, the issuer and audience against your expected values, the expiry, and the original nonce. Only after that check do you read the assurance level. Issue the session only when the validated token reports VERIFIED. The access token returned alongside it is valid for one hour and is accepted only by the UserInfo endpoint, in an Authorization: Bearer header or an access_token form field on a POST.

Expected output
On an approved check, the ID token carries a verified_claims array. Each entry holds a verification object whose trust_framework is IDV-DELEGATED and whose assurance_level is VERIFIED, plus the compared claims, which on this profile are given_name and family_name. For a completed verification that is not approved, Didit returns an authorization code to the registered callback, and redeeming that code returns an ID token with assurance_level set to FAILED.
The Action must block login unless the validated ID token reports VERIFIED. Write that as a hard branch: read the assurance level from the token you validated in step 8, and when it is not VERIFIED, do not issue the session. Show a neutral message with the support or retry option appropriate to the case, and log your own login-attempt reference and the outcome for support. Do not tell the person why the check failed, and do not frame it as a wrong password, because a failure can come from fraud checks or an open review as easily as from a bad document.
Keep three failure shapes apart, in your logging and in what the user sees:
- A verification outcome carried by a valid ID token, where
assurance_levelisFAILED. The login is blocked and the person gets the neutral message plus the retry or support route you chose. - A callback problem: no
codearrives, thestatedoes not match, or the user never finished inside the 15-minute window. If the verification times out and your callback has no valid authorization code, stop the login attempt and start a fresh authorization request. - A token exchange or token validation failure: the code is expired, already redeemed or paired with the wrong verifier, or a signature, issuer, audience, expiry or nonce check fails. Treat these as exchange or validation failures. Start a fresh attempt after expiry and investigate repeated validation failures. Log it, alert on it, and do not show a verification failure message.
Sandbox acceptance checklist
Run these four before launch. The sandbox is free on every plan. Both environments use the same endpoints. Use the client credentials and workflow for the environment you are testing.
| Case | How to produce it | Expected outcome |
|---|---|---|
| Approved verification | Complete a simulated pass in the sandbox flow | A code returns, the exchange succeeds, the validated ID token reports VERIFIED, and the Action issues the session |
| Session still in review when the code is redeemed | Complete a simulated case that stays under review | The code returns and the ID token reports FAILED; the Action blocks the login |
| Approval changed before redemption | Take an approved session and let a later fraud review move it to a failing decision before you redeem | The ID token reports FAILED; the Action blocks the login |
| Expired or already redeemed code | Hold the code past its 5 minute lifetime, or redeem it a second time | An expired code cannot complete the login. A second redemption is rejected and cannot complete another login |
Inputs and outputs
| Field | Where | What it does |
|---|---|---|
redirect_uri | Input | Must match a registered URI exactly |
state | Input and output | Returned unchanged with the code; compare it before redeeming to match the resumed login |
nonce | Input | Binds the ID token to this login attempt and is checked during validation |
code_challenge, code_challenge_method | Input | PKCE, S256 is required on this profile |
scope | Input | openid profile identity_assurance |
claims | Input | The verified_claims array with given_name and family_name to compare |
request_uri | Output | Single use, valid 60 seconds, handed to the authorization endpoint |
code | Output | Single use, valid 5 minutes once issued, exchanged with the verifier |
| ID token | Output | RS256, carries verified_claims and the assurance level |
access_token | Output | Valid one hour, accepted only by UserInfo |
Failure cases and recovery
| Symptom | Cause | Recovery |
|---|---|---|
| PAR rejected | Redirect URI differs by a slash, a path or a query string | Copy the registered URI byte for byte into the request |
| PAR rejected | PKCE missing on a profile that requires it | Send code_challenge with method S256 on every request |
| User lands on an error instead of the flow | request_uri older than 60 seconds or already used | Push a fresh authorization request from the Action |
| Code exchange fails | Code expired, already redeemed, or verifier mismatch | Start a new authorization request; never retry an old code |
| The verification exceeds the documented 15-minute window | The user did not finish in time | If your callback has no valid authorization code, stop the login attempt and start a fresh authorization request |
| Login blocked after a clean check | A later fraud review moved the session to a failing decision; the decision is re-read at code redemption | Expected behaviour. Read the session in the Console and log the case before you retry |
| Client authentication failure at the PAR or token endpoint | Wrong secret, or the authentication method you configured does not match the one you send | Check the dedicated client secret for this integration and the authentication method you configured, then retry |
The verification decision is re-read when the code is redeemed, so the verdict the Action sees is the verdict at redemption time, not the one shown at the end of the hosted flow. A session that was approved and then flagged by a later fraud review returns FAILED. Build the Action so a FAILED result is a normal branch with logging, not an exception.

What you pay and where review boundaries sit
You pay per completed check from prepaid credit. Because the bridge creates a real verification session, the session lines apply, not the standalone API lines. A full KYC check is $0.33 and it is three parts in one check: ID document verification $0.15, biometrics at $0.10 passive liveness plus $0.05 face match 1:1, and device and IP analysis $0.03. Add AML screening at $0.20 if your workflow screens the person, face search 1:N at $0.05 per search, and proof of address at $0.20 when you collect it. The Didit pricing page carries every line and the cost estimator.
- Free: the first organization created with an eligible work email gets $10 in monthly Free plan credit. The sandbox is free on every plan.
- Growth: $99 a month, $115 of credit a month, 4% off every Didit price.
- Scale: $299 a month, $350 of credit a month, 10% off every Didit price.
Plan credit offsets usage. It does not pay the subscription fee, and unused monthly credit does not roll over.
We can hold the user on a review page for a configured time. If the session is still in review when the code is redeemed, the ID token reports FAILED. If a later fraud review changes an approval to a failing decision before redemption, the token also returns FAILED. Agree that window before launch: a long hold keeps a real person waiting on a Didit page, and a short one sends them back to your login with FAILED. The statuses that drive all of this are documented under verification statuses, and the reviewer side under manual KYC review.
Worked cost example
Suppose 5,000 logins a month reach the Action and each one completes a full KYC check with no AML step.
Per check at list price: $0.15 + $0.10 + $0.05 + $0.03 = $0.33. At 5,000 checks: 5,000 x $0.33 = $1,650.00 a month.
On Growth the same check is $0.3168: 5,000 x $0.3168 = $1,584.00 of usage. After the $115 of monthly plan credit, $1,469.00 of usage remains. Add the $99 monthly fee for a total of $1,568.00 a month.
On Scale the check is $0.297: 5,000 x $0.297 = $1,485.00 of usage. After the $350 of monthly plan credit, $1,135.00 of usage remains. Add the $299 monthly fee for a total of $1,434.00 a month.
Add AML screening and the list price version becomes 5,000 x ($0.33 + $0.20) = 5,000 x $0.53 = $2,650.00 a month. Sandbox runs cost nothing, so the whole integration can be built and regression tested before the first billed check.
Sources
- Didit docs: Okta, Auth0 and OpenID Connect identity verification
- Didit docs: verification statuses and session lifecycle
- Didit docs: manual KYC review
- Didit docs: applications, Live and Sandbox
- Didit docs: API authentication
- Didit pricing page and price feed, read November 26, 2026
- Didit identity verification product page
- Didit MCP server
Open the sandbox at https://business.didit.me/, create an application with a KYC workflow, and run one login through the whole eight-step path against simulated outcomes. No sales call is needed, and nothing in the sandbox is billed.
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
What is the Didit integration for Auth0 post-login Actions?
It is an OpenID Connect authorization server that performs a Didit verification when an Auth0 post-login Action asks for one, then returns the result as an ID token with a verified_claims array. Teams use it to require a Didit identity check after Auth0 authenticates the user and before the login completes; it does not replace the initial login. The trust framework is IDV-DELEGATED and the assurance level is VERIFIED or FAILED, and the base URL is https://apx.didit.me/auth/idv for both production and sandbox.
Is PAR mandatory for the Auth0 profile?
Yes. The Okta and Auth0 profile accepts only a Pushed Authorization Request, and PKCE with S256 is required. The request_uri that PAR returns is single use and valid for 60 seconds. The plain authorization request option belongs to the separate OpenID Connect profile, which this guide does not use.
How long does a user have to finish the Didit verification?
The user has 15 minutes from the authorization request to finish the verification. The authorization code is valid for 5 minutes once it is issued and can be redeemed once. If either window closes, start a new authorization request instead of retrying the old one.
Why does a user who passed the hosted flow come back with a FAILED assurance level?
The verification decision is re-read when the code is redeemed, so the verdict at redemption is what your Action receives. A session that is still in review at that moment returns FAILED, and so does an approval that a later fraud review moves to a failing decision before redemption. Log the case and read the session detail in the Console before you retry.
Can Didit hold the user while a reviewer looks at the session?
Yes. We can hold the person on a review page for a configured time to give a reviewer a chance to decide. If the session is still in review when the code is redeemed, the profile returns FAILED, and a later fraud review that changes an approval to a failing decision before redemption also returns FAILED. Treat the window as a product decision to agree before launch.
How much does each verification cost in this flow?
A full KYC check is $0.33 at list price, made of $0.15 for the ID document, $0.10 for passive liveness, $0.05 for face match and $0.03 for device and IP analysis. AML screening is $0.20 more if your workflow runs it. Growth applies 4% off and Scale 10% off, and billing is per completed check from prepaid credit.
Where do I keep the Didit client secret, and can I rotate it?
Keep it in your identity platform's secret store, because it authenticates your client at the PAR and token endpoints only. We show the secret once when it is issued, and we can rotate it on request. The replaced secret keeps working for a grace period of 24 hours unless you ask for another one, so a switch needs no downtime.
What must the Action validate before it trusts the ID token?
Before trusting a Didit ID token, the Auth0 Action should verify its RS256 signature against Didit's JWKS and validate the issuer, audience, expiry and original nonce. After validating the ID token, the Action checks the assurance level and allows Auth0 to continue the login only when it is VERIFIED. Skipping the validation turns a valid-looking token into an access decision you cannot defend.
What claims can I compare against the verification?
On the Auth0 profile, given_name and family_name, both compared fuzzily. You send them inside the standard OpenID Connect claims parameter of the PAR request, as a verified_claims array. The plain OpenID Connect profile releases a wider set of claims, but this guide uses the Okta and Auth0 profile.
What happens if the authorization code is redeemed twice?
Didit authorization codes are valid for 5 minutes and can be redeemed once. A second redemption is rejected and cannot complete another login. A separate login attempt needs a fresh authorization request.
Does the same integration work on Okta?
Yes. The same profile implements the delegated identity verification contract Okta uses for bring-your-own identity verification vendors on Identity Engine, and Auth0 uses the same contract. One profile, two platforms, the same endpoints and the same claim comparison.
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


