Online Verification
Verify mDL credentials online using OpenID4VP for web and mobile applications.
Overview
Online verification uses the OpenID for Verifiable Presentations (OpenID4VP) protocol to request and receive mDL credentials over the internet. This is ideal for remote identity verification, account creation, and online age verification.
1️⃣
Create Request
Generate OpenID4VP authorization request
→
2️⃣
User Redirects
User opens wallet and approves
→
3️⃣
Callback
Receive verified response
Complete Example
online-verify.tstypescript
Loading...
Handling the Callback
After the user approves the request in their wallet, they will be redirected to yourredirectUri with the response:
callback.tstypescript
Loading...
Session Options for Online Mode
| Option | Type | Required | Description |
|---|---|---|---|
mode | 'online' | Yes | Set to 'online' for OpenID4VP |
redirectUri | string | Yes | Callback URL for responses |
state | string | Recommended | State parameter for CSRF protection |
nonce | string | Recommended | Nonce for replay protection |
requestedClaims | ClaimSet | string[] | Yes | Claims to request |
clientMetadata | object | Optional | Verifier metadata shown to user |
Client Metadata
Provide client metadata to display your organization's information in the wallet:
client-metadata.tstypescript
Loading...
Presentation Definition
For advanced use cases, you can customize the presentation definition:
presentation-definition.tstypescript
Loading...
Same-Device vs Cross-Device
The SDK supports both same-device and cross-device flows:
device-flows.tstypescript
Loading...
Next.js Integration
app/api/verify/route.tstypescript
Loading...