Warning
This guide is specific to Web SDK 2.x. For Web SDK 1.x, you can find documentation here.
Do not attempt to upgrade or implement without support. Contact your Incode representative to check if you are a candidate for this upgrade.
The Digital ID redirect lets a user verify their identity with a digital ID they already have (a bank ID, a national eID app, or a digital wallet) instead of capturing a document. The SDK sends the user to the provider's site in a full-page redirect; after the user authenticates, the provider returns them to your page and the flow resumes and completes. Verified identity data arrives as OCR-aligned interview data — no document capture, and no selfie-to-ID face match when the scheme returns no portrait.
Supported schemes:
| Scheme | Country | Portrait returned |
|---|---|---|
| iDIN (bank identification, PSD2-aligned) | Netherlands | No |
| FTN (bank IDs + Mobile ID, eIDAS) | Finland | No |
| itsme | Belgium | No |
| SPID | Italy | No |
| MitID | Denmark | No |
| BankID | Sweden | No |
| France Identité | France | Sometimes |
| L'Identité Numérique | France | No |
| LA Wallet | United States (Louisiana) | Yes |
| DigiLocker (Aadhaar) | India | Yes |
Whenever a scheme returns no portrait (iDIN and FTN never do), the flow skips the ID-to-selfie face match automatically for that verification.
Each scheme must be provisioned for your organization by Incode before it can be enabled for a flow. Contact your Incode Representative to turn a scheme on.
Some schemes complete on the user's phone (for example with a QR code or an app deep link) rather than in a browser. For those, the redirect lands on a page hosted by Incode's identity network partner, which shows the QR code or deep link and then returns the user to your page. The SDK flow is the same full-page redirect either way.
Info
This is not a standalone step. It runs inside the ID Capture module: every digital-ID method enabled for the flow gets its own option on the document chooser — one card per provider (for example iDIN and Finnish Trust Network), each with the provider's name and logo, alongside Identity Card and Passport. The list scrolls when many providers are enabled.
When the module accepts no ID or passport (for example a Finnish Trust Network-only workflow), the camera never opens. With one redirect provider, ID Capture enters it directly. With several digital-ID options, the chooser appears instead of the camera. Use another method from a provider returns the user to the chooser, except after the SDK entered a sole provider automatically, which closes the module.
When two or more providers serve different countries, the chooser lists the providers for the user's likely country first and shows "Viewing options for" with that country. The user can tap it to pick another region. Every provider stays available.
Prerequisites
- Web SDK 2.0 enabled for the flow. On a flow running the 1.x experience, the digital-ID configuration is ignored and the chooser never shows the option.
- A digital-ID method on the flow's ID Capture module. Enable one or more of the supported schemes (for example iDIN or FTN) for the flow in Dashboard. The flow configuration then carries it under
digitalIds.methods. - A registered return URL. The provider returns the user to your page's origin + path. Incode registers this per environment with the identity network — contact your Incode Representative with the exact URL (or origin wildcard) your integration uses. An unregistered return URL makes verification creation fail with HTTP 400.
- A session that survives the redirect. The round trip fully unloads your page. Launch the flow with a resumable session identifier (hosted onboarding links include one), or preserve one yourself — see Surviving the redirect.
How the journey works
- The user picks the provider's card (for example iDIN) in the ID Capture chooser (or the flow auto-starts it when it is the only method).
- The SDK creates a verification and receives the provider's
launchUrl. - The SDK performs a full-page redirect to
launchUrl. No popup, iframe, or webview is involved. - The user authenticates with the provider.
- The provider redirects back to your return URL with
success,sessionId, andresultsAccessKeyappended as query parameters. - Your page re-mounts the flow and hands those parameters to the SDK, which resumes the step, submits the result, and shows a success screen. The user taps Continue and the flow proceeds.
- On failure the user sees reason-specific copy with Try again and Use another method (falls back to the document chooser when the flow allows it).
Configuration
Two config fields drive the redirect round trip. They have the same names and behavior on <incode-flow>, <incode-workflow>, and the standalone <incode-id> module:
| Option | Type | Required | Description |
|---|---|---|---|
digitalIdReturnUrl |
string |
❌ | HTTPS page the provider returns the user to. Defaults to the current page (origin + pathname). Override it when your return route differs. Query parameters you add are preserved. |
digitalIdReturn |
{ returnParams: RedirectReturnParams } |
❌ | Pass on the return leg only. Hands the provider's return parameters to the SDK so it resumes the verification instead of starting the step fresh. |
type RedirectReturnParams = {
success: boolean;
sessionId: string;
resultsAccessKey: string;
};
Return-leg wiring
Add your own marker to digitalIdReturnUrl so the return leg is detected unambiguously. A canceled verification can return without sessionId or resultsAccessKey, so detecting on those parameters misses cancellations:
import type { FlowConfig } from '@incodetech/web/flow';
const config: FlowConfig = {
clientId: 'YOUR_CLIENT_ID',
configurationId: 'YOUR_FLOW_ID',
// ...your existing options
digitalIdReturnUrl: `${window.location.origin}${window.location.pathname}?digital_id_return=1`,
};
On the returning page load, detect the marker, hand the provider's parameters to the flow or workflow config, and remove them from the address bar (resultsAccessKey grants access to the result — do not let it linger in the URL or browser history):
const params = new URLSearchParams(window.location.search);
const isDigitalIdReturn = params.get('digital_id_return') === '1';
if (isDigitalIdReturn) {
config.digitalIdReturn = {
returnParams: {
success: params.get('success') === 'true',
sessionId: params.get('sessionId') ?? '',
resultsAccessKey: params.get('resultsAccessKey') ?? '',
},
};
for (const p of ['digital_id_return', 'success', 'sessionId', 'resultsAccessKey']) {
params.delete(p);
}
window.history.replaceState({}, '', `${window.location.pathname}?${params}`);
}
The provider may append additional parameters — read these three and ignore the rest.
Surviving the redirect
The redirect unloads your page, so the returning page must re-attach to the same onboarding session. A fresh session does not know the verification and the resume fails.
- Hosted onboarding links (launched with a session identifier in the URL) resume automatically.
- Self-hosted integrations: persist a resumable session identifier before the flow mounts — for example in
sessionStorage, which survives a same-tab redirect round trip — and pass it back into the flow or workflow config on the return leg.
The verification identifier itself is persisted by the SDK in browser storage and recovered on return; you only preserve the session.
Failure handling
When the verification fails, the ID Capture state is status: 'digitalIdRedirect', phase: 'failed', with a failureReason:
failureReason |
Meaning |
|---|---|
USER_CANCELED / RP_CANCELED |
The user backed out at the provider. Neutral copy — not an error. |
AUTHENTICATION_FAILED |
Authentication with the provider failed. Retry offered. |
VERIFICATION_FAILED |
The scheme could not verify the identity. |
SESSION_EXPIRED / SESSION_TOKEN_EXPIRED |
The verification session lapsed before completion. |
PROVIDER_INTERNAL_ERROR / RESULTS_EXCHANGE_FAILED / INVALID_REDIRECT_RESULT |
Technical error on the provider side. |
Drive recovery with the ID Capture manager: digitalIdRedirectRetry() starts a new verification, digitalIdRedirectUseAnotherMethod() returns to the document chooser, and digitalIdRedirectContinue() acknowledges the success screen.
Each verification — including every retry — creates a new provider session, which is a billable event. Retries only happen on an explicit user action, never automatically.
API endpoints
The module rides on the Digital ID Verification API. Direct API integrators use the same contract:
| Call | Purpose |
|---|---|
POST /omni/v2/digital-id/verifications |
Create a verification. Returns verificationId and flowData.launchUrl (billable moment). |
POST /omni/v2/digital-id/verifications/{id}/response |
Submit the provider's return parameters. |
GET /omni/v2/digital-id/verifications/{id}/status |
Poll verification status — fallback when results are delayed. |
POST /omni/v2/digital-id/verifications/{id}/refresh |
Refresh an expiring launchUrl without creating a new (billable) verification. |
Verification status values: CREATED, IN_PROGRESS, COMPLETED, CANCELLED, FAILED, EXPIRED.
See also
- ID Capture: the module that hosts this sub-flow
- Session Management: session identifiers and re-attachment
- IncodeFlow Component:
FlowConfigreference