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.

SettingWhere in StudioWhat to configure
Allow embeddedThe flow's settingsSwitch it on so the flow can run as an embedded card.
Allowed embed originThe flow's Domains tab → Add, type Allowed embed originAdd 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 URLThe flow's Domains tab → Add, type WebhookRegister 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 secretsCreate both under Clients → OAuth, then attach them in the flow's Secrets tab → Add secretThe 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:

ValueWhere to find it
Client IDClient Identifier on the flow's Configuration tab
Issuer URIAuthorization URI on the same tab, without the trailing /authorization/oauth/request
Client secretThe key of the attached OAuth secret
Webhook secretThe key of the attached HMAC secret
Webhook URLThe 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:

PackageWhere it runsWhat it does
@ver-id/embedded-node-clientBackendCreates the session and receives and verifies the result through your webhook.
@ver-id/embedded-browser-clientBrowserShows 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.

OptionWhereWhat it does
Embedded appearanceThe flow's Brands tab → a brand → Embedded appearance → CustomizeSet 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 JSONThe same screen's JSON panelCopy an appearance from one brand and paste it into another. Click Save to persist it.
Several brandsThe flow's Brands tabGive each brand its own appearance. Mark one as default; select another per session with brandUuid.
Several embed originsThe flow's Domains tabAdd one Allowed embed origin per website, such as production and staging.
Several webhook URLsThe flow's Domains tabRegister one per environment. Each backend sends its own URL as webhookUri.

Troubleshooting

SymptomLikely causeFix
Activation fails with an embedded errorAllow 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 OperationFailedErrorUnknown 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 openingThe 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_allowedThe 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.

On this page