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

OptionTypeRequiredDescription
mode'online'YesSet to 'online' for OpenID4VP
redirectUristringYesCallback URL for responses
statestringRecommendedState parameter for CSRF protection
noncestringRecommendedNonce for replay protection
requestedClaimsClaimSet | string[]YesClaims to request
clientMetadataobjectOptionalVerifier 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...