You can integrate the Didit verification session into your web app in two ways:
- A redirect button that opens the session in a new tab or replaces the current page
- An embedded iframe that runs the flow directly inside your app layout
Both options use the verification_url
returned from the Create Verification Session API.
π Redirect Button
Trigger a redirect to the Didit-hosted session. Once the verification is complete, the user is returned to the callback
you defined during session creation.
<button
onClick={() => window.location.assign("{verification_url}")}
className="px-4 py-2 rounded-md bg-primary text-white"
>
Start Verification
</button>
Best for cross-device flows
π User returns to your app viacallback
after verification
π§± Embedded Iframe
Embed the session inside an iframe to keep the user on your site and deliver a seamless, branded experience
<iframe
src="{verification_url}"
style="width:100%; height:650px; border:none;"
allow="camera; microphone; fullscreen; autoplay; encrypted-media"
/>
Note: You must includeallow="camera; microphone; fullscreen; autoplay; encrypted-media"
These permissions are required for liveness detection and biometric verification to work properly on all browsers.
β
Best for apps with branded onboarding or single-page flows
π¨ Fully customizable via logo, colors, domain β see white-label options
Example Implementation
- Next.js