Embedded mode
Configure a flow in Ver.iD Studio and show it inside your website with the embedded SDKs.
Embedded mode shows a Ver.iD flow as a card inside your website, or a drawer on a phone. Your backend creates the session and receives the result through a signed webhook. The browser shows the card and reports when the flow ends.
What you need
- Complete Getting started and create the disclosure, authentication or issuance your website needs.
- Have a backend that can keep secrets and receive a webhook at a public HTTPS URL. Use a tunnel such as ngrok during development.
- Identify the exact origin of each website that will show the card, including its protocol, domain and port.
Configure the flow in Studio
Settings can only be changed while the flow is inactive. If it is live, click Deactivate first.
All four settings below are required. Studio will not activate a flow with Allow embedded enabled if any of the other settings are missing.
| Setting | Where in Studio | What to configure |
|---|---|---|
| Allow embedded | The flow's settings | Switch it on so the flow can run as an embedded card. |
| Allowed embed origin | The flow's Domains tab → Add, type Allowed embed origin | Add at least one origin: protocol, domain and port, for example https, www.example.com, 443. Only the origin counts, not the path. Add each host (with or without www) and environment separately. |
| Webhook URL | The flow's Domains tab → Add, type Webhook | Register the full URL on your backend, including its path, for example https://api.example.com/api/verid/webhook. Your backend must send exactly this URL when it creates a session. |
| Active OAuth and HMAC secrets | Create both under Clients → OAuth, then attach them in the flow's Secrets tab → Add secret | The OAuth secret is your client secret; embedded mode requires a confidential client. The HMAC secret signs each webhook so your backend can verify it came from Ver.iD. |
Click Activate, then collect these values for the backend SDK:
| Value | Where to find it |
|---|---|
| Client ID | Client Identifier on the flow's Configuration tab |
| Issuer URI | Authorization URI on the same tab, without the trailing /authorization/oauth/request |
| Client secret | The key of the attached OAuth secret |
| Webhook secret | The key of the attached HMAC secret |
| Webhook URL | The exact URL you registered on the flow |
Keep VERID_CLIENT_SECRET and VERID_WEBHOOK_SECRET on your server only.
Neither is needed in the browser.
Connect your website
Add the SDK package to each part of your application:
| Package | Where it runs | What it does |
|---|---|---|
@ver-id/embedded-node-client | Backend | Creates the session and receives and verifies the result through your webhook. |
@ver-id/embedded-browser-client | Browser | Shows the card and reports when the flow ends. |
Each linked README contains a complete example. Configure the backend SDK with the values from the previous step. Pass its sessionContext to the browser SDK to show the card.
The result is delivered only to your backend's webhook. The browser's completion event carries no result; use it to ask your backend for the outcome.
Optional settings
Without customization, the card uses the Ver.iD default look and your flow's default brand.
| Option | Where | What it does |
|---|---|---|
| Embedded appearance | The flow's Brands tab → a brand → Embedded appearance → Customize | Set card, text, button, link and error colours, corner radius (0–24 px), button radius (0–24 px) and border width (0–3 px). The live preview shows the desktop card and phone drawer. Hosted redirect pages keep the Ver.iD look. Reset to default returns the brand to the Ver.iD look. |
| Appearance as JSON | The same screen's JSON panel | Copy an appearance from one brand and paste it into another. Click Save to persist it. |
| Several brands | The flow's Brands tab | Give each brand its own appearance. Mark one as default; select another per session with brandUuid. |
| Several embed origins | The flow's Domains tab | Add one Allowed embed origin per website, such as production and staging. |
| Several webhook URLs | The flow's Domains tab | Register one per environment. Each backend sends its own URL as webhookUri. |
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Activation fails with an embedded error | Allow embedded is on, but an embed origin, webhook, OAuth secret or HMAC secret is missing or expired. | While the flow is inactive, add or replace what the error names, then activate it again. |
Creating a session fails with OperationFailedError | Unknown client ID, incorrect client secret or an inactive flow. | Check the values from Configure the flow in Studio and confirm the flow is active. |
| The card shows an error immediately after opening | The backend's webhook URL is not registered on the flow, or Allow embedded is off. | Register that exact URL as a Webhook domain and switch on Allow embedded. |
origin_not_allowed | The page's origin is not an allowed embed origin, often because of www versus no www, or a staging host. | Add the page's exact protocol, domain and port. |
For Content Security Policy, webhook signature and session-store issues, see the Security sections of the backend SDK and browser SDK READMEs.
Before going live, review the Ver.iD Privacy Policy.