iGrant.io issuer frontend (OpenID4VCI)
When to use
Build the issuer-side UI: a user requests a credential, scans a QR (or taps a
same-device deep link), and the page updates the instant the wallet accepts.
Depends on igrantio-frontend-client (vendored at src/lib/ows/) and an
igrantio-issuer-backend deployment. Verifier UI is a separate skill
(igrantio-verifier-frontend).
Before you build: run the integrator intake in igrantio-ows-overview - environment, API key, tenancy, backend host, webhooks, frontend - one question at a time, a recommended default with each.
What it provides
useIssuance({ proxyBaseUrl, webhookBaseUrl }) →
{ status, offerUri, credentialExchangeId, error, issueInTime, issueDeferred, reset }.
issueInTime(payload) - claims known now.
issueDeferred(startRequest, claims) - create the offer now; the hook pushes
the claims automatically on the offer_received webhook.
status: idle → offer_ready → scanned → issued (or error).
IssuerFlow - a minimal end-to-end demo component.
Flow (what happens)
POST …/credential/issue → read credentialHistory.CredentialExchangeId
(SSE key) and credentialHistory.credentialOffer (QR URI).
- Open SSE on the exchange id; render the QR / same-device button. For the
full QR panel (optional centre logo, green tick on scan, refresh,
open-in-wallet button, tx-code block) use
igrantio-qr-code - it asks the
integrator about the logo and tick options.
- SSE
data.credential.status:
offer_received → (deferred) push claims via PUT …/credential/history/{id}.
credential_accepted / token_issued → done, close SSE.
Steps
- Vendor
igrantio-frontend-client/references/lib/ows into src/lib/ows/.
- Copy
./references/features/issuer into src/features/issuer/.
npm i qrcode @types/qrcode (for QrCode).
- Wire it up:
<IssuerFlow
proxyBaseUrl="https://host/ows/acme"
webhookBaseUrl="https://host/webhook"
credentialDefinitionId="<cred-def-id>"
claims={{ given_name: "Lars", family_name: "Johansson" }}
/>
Replace the demo's hard-coded payload with your form; for namespaced formats
(mdoc) nest claims under the namespace, e.g. { "org.iso.18013.5.1": { … } }.
Clean-code notes
- No
@igrant/* SDK; OWS specifics live in the client, flow logic in the hook,
presentation in the component - swap the UI without touching the flow.
- The QR URI and exchange id are the only two response fields the UI needs.
Validation / done criteria
- Scanning the QR with a wallet drives
status to issued within ~1s of accept.
- Deferred issuance pushes claims exactly once (on
offer_received).
- No OWS API key is present anywhere in the browser bundle.
Documentation & workflows
When anything is unclear, consult the iGrant.io documentation before guessing:
1---2name: igrantio-issuer-frontend3description: Build the browser UI for an OpenID4VCI credential ISSUER against the iGrant.io Organisation Wallet Suite. Request in-time or deferred issuance through your tenant backend proxy, render the credential-offer QR (or same-device deep link) for an EUDI Wallet (EUDIW) or European Business Wallet (EUBW), and reflect live status over SSE (offer scanned → credential accepted). Composes igrantio-frontend-client; talks to igrantio-issuer-backend.4license: Apache-2.05---67# iGrant.io issuer frontend (OpenID4VCI)89## When to use10Build the issuer-side UI: a user requests a credential, scans a QR (or taps a11same-device deep link), and the page updates the instant the wallet accepts.12Depends on `igrantio-frontend-client` (vendored at `src/lib/ows/`) and an13`igrantio-issuer-backend` deployment. Verifier UI is a separate skill14(`igrantio-verifier-frontend`).1516**Before you build**: run the integrator intake in `igrantio-ows-overview` - environment, API key, tenancy, backend host, webhooks, frontend - one question at a time, a recommended default with each.1718## What it provides19- **`useIssuance({ proxyBaseUrl, webhookBaseUrl })`** →20 `{ status, offerUri, credentialExchangeId, error, issueInTime, issueDeferred, reset }`.21 - `issueInTime(payload)` - claims known now.22 - `issueDeferred(startRequest, claims)` - create the offer now; the hook pushes23 the claims automatically on the `offer_received` webhook.24 - `status`: `idle → offer_ready → scanned → issued` (or `error`).25- **`IssuerFlow`** - a minimal end-to-end demo component.2627## Flow (what happens)281. `POST …/credential/issue` → read `credentialHistory.CredentialExchangeId`29 (SSE key) and `credentialHistory.credentialOffer` (QR URI).302. Open SSE on the exchange id; render the QR / same-device button. For the31 full QR panel (optional centre logo, green tick on scan, refresh,32 open-in-wallet button, tx-code block) use `igrantio-qr-code` - it asks the33 integrator about the logo and tick options.343. SSE `data.credential.status`:35 - `offer_received` → (deferred) push claims via `PUT …/credential/history/{id}`.36 - `credential_accepted` / `token_issued` → **done**, close SSE.3738## Steps391. Vendor `igrantio-frontend-client/references/lib/ows` into `src/lib/ows/`.402. Copy [`./references/features/issuer`](./references/features/issuer) into `src/features/issuer/`.413. `npm i qrcode @types/qrcode` (for `QrCode`).424. Wire it up:43 ```tsx44 <IssuerFlow45 proxyBaseUrl="https://host/ows/acme"46 webhookBaseUrl="https://host/webhook"47 credentialDefinitionId="<cred-def-id>"48 claims={{ given_name: "Lars", family_name: "Johansson" }}49 />50 ```51 Replace the demo's hard-coded payload with your form; for namespaced formats52 (mdoc) nest claims under the namespace, e.g. `{ "org.iso.18013.5.1": { … } }`.5354## Clean-code notes55- No `@igrant/*` SDK; OWS specifics live in the client, flow logic in the hook,56 presentation in the component - swap the UI without touching the flow.57- The QR URI and exchange id are the only two response fields the UI needs.5859## Validation / done criteria60- Scanning the QR with a wallet drives `status` to `issued` within ~1s of accept.61- Deferred issuance pushes claims exactly once (on `offer_received`).62- No OWS API key is present anywhere in the browser bundle.6364## Documentation & workflows6566When anything is unclear, consult the iGrant.io documentation before guessing:6768- iGrant.io developer APIs (index): https://docs.igrant.io/docs/developer-apis69- Getting started: https://docs.igrant.io/docs/get-started/70- OpenID4VC API (issuer / verifier / webhook): https://docs.igrant.io/docs/category/openid4vc-api/issuer71- Workflow: issue a credential (OID4VCI): https://docs.igrant.io/docs/openID4vci-issue-credential-intime/