demo · v141

Presentation

Compose a Digital Credentials request, click "Request credential", and have the browser call out to a wallet for an mDoc / W3C VC presentation. The page probes for the API, builds a real DigitalCredentialRequestOptions, and either presents the response or shows the failure mode.

Heads up On Android, this requires a wallet app registered with Credential Manager (e.g. Google Wallet with a beta mDoc). On desktop the call will reject with "no provider" — the page surfaces that as a real outcome.
probing…
No request made yet.

the call

const response = await navigator.credentials.get({
  digital: {
    requests: [{
      protocol: "org-iso-mdoc",
      data: {
        nonce: crypto.getRandomValues(new Uint8Array(16)),
        requestedElements: [{
          namespace: "org.iso.18013.5.1",
          name: "age_over_18",
          intentToRetain: false,
        }],
      },
    }],
  },
});
console.log(response.data);  // wallet-signed credential bundle

see also