npm / @openid4vc/openid4vci
@openid4vc/openid4vci
What changed in @openid4vc/openid4vci 0.3 to 0.10, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-25.
55 breaking11 security5 deprecations33 new APIs and options4 behavior and defaults23 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@openid4vc/openid4vci 0.1031 changes
Breaking changes 19
Specification values that cannot be empty are now rejected when empty, including client_id, nonce, c_nonce, pre-authorized_code, vct, access_token, and jti.
createFetcher and createZodFetcher take callbacks and a request type instead of a fetch function; the returned fetcher takes a string URL and uses callback fetch and fetchLimits.
Rejects none as a supported DPoP signing algorithm.
Rejects signed credential issuer metadata using a jwk or did signer; metadata should use a kid, x5c, or federation trust_chain.
Requires a type option identifying authorization server metadata or credential issuer metadata.
CallbackContext hash is now a Hasher from @owf/identity-common that receives the algorithm as 'sha-256'; HashAlgorithm and HashCallback are removed.
Oauth2Error, Openid4vciError, and Openid4vcBaseError now extend IdentityError; their name is the class name, and Oauth2Error and Openid4vciError no longer append their cause message.
No longer exports its JWK, JWA, JWS, and JWT helpers; import the corresponding helpers from @owf/jose, using the listed renamed equivalents where applicable.
Drops copies of @owf/identity-common helpers, ValidationError, zNumericDate, and its buffer dependency; use the corresponding identity-common helpers instead.
Rejects request objects from pre-registered clients signed with jwk or did; errors report the client as unauthenticated with client undefined.
ZodFetcher results and the *Result fields of openid4vci responses use SchemaParseResult with issues.
CallbackContext replaces signJwt and verifyJwt callbacks with signJws and verifyJws, which sign or verify the signing input and return the public key used.
The @openid4vc packages use ValidationError from @owf/identity-common, whose issues replace zodError; formatZodError is removed.
Rejects attestations signed with a jwk signer; use an attester identified by x5c, trust_chain, a trusted DID, or another kid resolved by verifyJws.
Requires an iat on client attestation PoPs and rejects proofs older than 300 seconds.
Rejects jwt proofs whose iat is more than 300 seconds old.
Takes jwt, verifyJwsCallback, and skewSeconds; checkExpirationTime, checkNotBefore, and checkIssuedAt replace skipTimeBasedValidation.
JWT verification is stricter: rejects future-issued or expired-at-exp tokens, missing expected aud, unsupported algorithms and malformed or unsafe JWT parts, among other cases.
Only accepts an HTTPS jwks_uri.
Security 5
Client attestation verification and authorization and access token request verification accept expectedChallenge so servers can enforce an issued challenge.
DPoP verification APIs accept expectedNonce so servers can require their nonce for authorization and resource requests.
No longer includes the response body in its message; the body remains available as textResponse, preventing fetched internal response content from being exposed.
Only fetches credential_offer_uri values that are HTTPS URLs and keeps offers, which may contain pre-authorized codes, out of error messages.
Attestations signed with a DID are passed to verifyJws, which must check that the DID belongs to an attester it trusts; resolving the DID alone is not enough.
New APIs and options 4
JWT verification and several client and server classes accept a default allowed skew of 30 seconds; verification also takes now.
The fetch callback receives the requested operation as its third argument, allowing policies to vary by request type.
Requests read responses within CallbackContext fetchLimits, which default to 10 MiB per response; functions accepting fetch also accept fetchLimits.
Takes the type of what it requests.
Fixes and other changes 3
Transaction data that is not base64url-encoded UTF-8 or does not validate now produces invalid_transaction_data.
JWT typ values are accepted in any casing and with the application/ prefix; compare them with isJwtTyp from @owf/identity-common.
Only accepts strings beginning with data:, preventing other URLs with data: in a query from being accepted as data URLs.
@openid4vc/openid4vci 0.918 changes
Breaking changes 10
The alg is sent inside the jwk for OpenID4VCI 1.0 and next to the jwk for draft 14/15; the client fails before sending if neither the jwk nor the request has an alg.
Callbacks return { decrypted: false } for invalid ciphertext and throw only for internal failures, which are reported as server errors.
Now returns a Promise and requires contentType alongside issuerMetadata. Callers must deserialize application/json bodies before calling it; application/jwt callers pass the raw compact JWE string.
The options now require contentType alongside issuerMetadata to distinguish plaintext JSON bodies from encrypted JWT bodies.
Now returns a Promise and requires contentType alongside issuerMetadata. Callers must deserialize application/json bodies before calling it; application/jwt callers pass the raw compact JWE string.
The options now require contentType alongside issuerMetadata to distinguish plaintext JSON bodies from encrypted JWT bodies.
V1 issuers must not receive plaintext requests containing credential_response_encryption. Encrypt these requests or fail locally if request encryption is not advertised; earlier drafts retain plaintext requests with encrypted responses when request encryption is not advertised.
Its positional arguments now align with the existing response verifier.
The callback is now part of the Openid4vciClient callbacks type and is required to accept signed metadata.
Compression is rejected in credential requests and response-encryption parameters.
Security 2
Adds issuer-side validation of a Notification Request at the issuer's notification endpoint.
Issuer metadata is validated and client requests are encrypted when encryption is required or callers provide credentialRequestEncryption, with optional kid and enc selectors.
New APIs and options 3
Adds an error code for unknown notification ids.
Callers can provide credentialRequestEncryption to encrypt client requests, with optional kid and enc selectors.
Adds signedMetadata values required, preferred, or disallowed. The default is preferred with a verifyJwt callback and disallowed without one; the option is sent as the Accept header.
Fixes and other changes 3
The decryptJwe callback receives the credential_response_encryption JWK when decrypting credential and deferred credential responses.
Authorization-server DPoP nonces are preserved across authorization challenge, presentation-during-issuance, and PAR flows.
Invalid Notification Requests throw an Oauth2ServerErrorResponseError with this error code.
@openid4vc/openid4vci 0.88 changes
Breaking changes 1
Parsed header types now represent
typas a string, preserving the value as sent.
New APIs and options 6
Adds a utility for checking a JWT
typvalue against a type, including its accepted media type form and casing.Adds a schema that checks a JWT
typusing the new utility.Adds optional Credential Issuer Metadata support for issuer_info following ETSI TS 119 472-3.
Adds the IssuerInfo export for optional issuer_info Credential Issuer Metadata support.
Adds the IssuerInfoEntry export for optional issuer_info Credential Issuer Metadata support.
Adds the zIssuerInfo export for optional issuer_info Credential Issuer Metadata support.
Fixes and other changes 1
JWT
typheaders are accepted in full media type form and any casing across client attestations, JAR request objects, access tokens, credential proofs, key attestations, and signed issuer metadata.
@openid4vc/openid4vci 0.77 changes
Breaking changes 2
Checks requested credential response encryption against issuer metadata and rejects missing or unsupported encryption parameters.
Now requires issuerMetadata and performs the credential response encryption check against issuer metadata.
Security 1
Pass this value to jwt and attestation proof verification, including on Openid4vciIssuer, to verify issuer-required key attestation properties.
New APIs and options 4
Issuers that encrypt credential responses must advertise this field in their metadata.
Exports the credential response encryption check for direct use.
Can be called directly to verify that a key attestation meets issuer metadata requirements.
The issuer metadata schema now accepts zip_values_supported.
@openid4vc/openid4vci 0.62 changes
Breaking changes 2
Pushed or interactive authorization requests containing a request_uri parameter are rejected with invalid_request instead of fetching the request_uri.
Credential requests referencing an unsupported credential_configuration_id now return unknown_credential_configuration instead of invalid_credential_request.
@openid4vc/openid4vci 0.525 changes
Breaking changes 10
The main entry now points to the ESM build.
Requiring the package loads its ESM build and requires Node.js 20.19 or later, or 22.12 or later.
The attested_keys array is now required to be non-empty.
When present, key_storage must be a non-empty array.
When present, user_authentication must be a non-empty array.
When authorization server metadata is in issuer metadata, assume the issuer supports only the pre-authorized flow, preserving legacy behavior.
Now returns an object containing credentialResponse and optionally credentialResponseJwt, supporting credential response encryption.
The wallet attestation JWT payload schema no longer includes the exp field.
Grant types are parsed and verified against grant_types_supported; an incorrectly configured authorization server can cause issues.
Node 18 is no longer supported; the lowest supported version is 20.19+, and Node 26 is supported.
Security 1
JWT headers carrying trust_chain and kid are no longer rejected; kid is required when trust_chain is used for signature verification.
New APIs and options 9
Type declarations are exposed through the types export condition.
The second parameter now accepts an object with fetch and the matching resolve callback, in addition to the Fetch implementation accepted before.
Optional CallbackContext callback resolves authorization server metadata without a request; returning null indicates it definitively does not exist, while undefined falls back to HTTP.
Optional CallbackContext callback resolves JWK Sets without a request; if not provided or it returns undefined, keys are fetched over HTTP.
Credential requests now support di_vp proofs.
Exports the CreateCredentialResponseOptions type.
Adds the optional zip parameter.
Adds experimental support for presentation during issuance; the feature may change incompatibly in a patch release.
Adds support for request and response encryption.
Behavior and default changes 2
Key attestations now emit key-attestation+jwt as the typ; verification still accepts the legacy keyattestation+jwt value.
No longer requires a top-level alg; the encryptor uses jwk.alg and falls back to a top-level alg for backwards compatibility.
Fixes and other changes 3
The credential response check was fixed to match the spec definition.
The nonce claim is optional at the schema level; verification enforces it via expectedNonce when the Credential Issuer has a Nonce Endpoint.
Allows the proof JWT typ when its iss value does not match the DID in the JWT proof header.
@openid4vc/openid4vci 0.413 changes
Security 1
Adds a method to parse and verify an authorization response redirect URL using authorization server metadata.
Deprecations 1
Renames OpenId4VciDraftVersion; the old name is deprecated but remains available for backwards compatibility.
New APIs and options 1
Authorization servers should set this parameter to true to meet HAIP requirements for RFC 9207 issuer identification.
Behavior and default changes 1
Zod errors now provide more detail for nested errors.
Fixes and other changes 9
JWT claims iat, nbf, and exp now allow non-integer decimal numbers.
Metadata retrieval now throws an error if an error was thrown during the first try.
Claims are correctly transformed between object and array representations across drafts.
Fixes transformation to draft 11, which previously could throw a validation error because of an issue with validation logic.
Credential responses can contain both credential and credentials, enabling integration with issuers that return both for backwards compatibility.
Correctly transforms vc+sd-jwt and dc+sd-jwt identifiers between different OpenID4VCI draft versions.
Nested mdoc path values can be numbers or null, allowing access to nested claims in arrays after the namespace and element.
When fetching credential issuer or authorization server metadata from multiple URLs, a fetch error now triggers attempts to the other URLs; the error is thrown only if all requests fail.
Credential requests no longer throw when both format and credential_configuration_id are present, allowing wallets to broaden compatibility.
@openid4vc/openid4vci 0.327 changes
Breaking changes 11
Corrects the parameter name from authorizationServerMetata to authorizationServerMetadata.
Validation is stricter; for mso_mdoc, string identifiers are disallowed because the specification requires COSE algorithm numbers.
Updates the CredentialResponse and DeferredCredentialResponse credentials field types to reflect the object structure in Draft 15 and later.
Adds support for deferred credential issuance; the updated V1 deferred credential response requires a transaction_id.
Replaces the dpopJwk return value with a dpop object containing jwk; the return value also includes jwkThumbprint.
Renames the JWT signer method trustChain to federation and makes the trustChain variable optional.
Renames oid4vci to openid4vci, including the package name and class names.
Renames oid4vpRequestUrl to openid4vpRequestUrl.
Renames SHA-256 to sha-256 to align with IANA hash algorithm names.
Must receive authorizationRequestJwt returned by parsePushedAuthorizationRequest to ensure the JWT is verified.
Data validation has transitioned from Valibot to Zod, breaking packages that re-exported Valibot types or schemas.
Security 1
Can optionally return authorizationRequestJwt for JAR in pushed authorization requests; pass it to verifyPushedAuthorizationResponse so the JWT is verified.
Deprecations 4
Renames and deprecates SdJwtVcFormatIdentifier; implementations should use the new dc+sd-jwt format.
Renames and deprecates zSdJwtVcCredentialIssuerMetadataDraft14; implementations should use the new dc+sd-jwt format.
Renames and deprecates zSdJwtVcCredentialRequestFormatDraft14; implementations should use the new dc+sd-jwt format.
Renames and deprecates zSdJwtVcFormatIdentifier; implementations should use the new dc+sd-jwt format.
New APIs and options 6
Adds support for the new issuer metadata URL.
Adds valid credential configurations for known formats to the issuer metadata result. Shallow validation lets other configurations remain usable when unused configurations contain invalid format-specific properties.
Adds support for the sha-384 hash algorithm.
Adds support for the sha-512 hash algorithm.
Adds support for creating, resolving, and verifying signed credential issuer metadata.
Adds support for the W3C VCDM 2.0 SD-JWT format.
Behavior and default changes 1
Adds support for Draft 15, including improved wallet attestations and server-side verification. Callers must handle differences between Draft 14 and Draft 15; Draft 11 remains supported using Draft 14 syntax and is automatically converted.
Fixes and other changes 4
JWT parsing and verification now support aud values represented as arrays.
Key attestation verification accepts key-attestation+jwt in addition to keyattestation+jwt.
Adds support for Node 22 and 24.
Retrieves OAuth authorization server metadata from the well-known path between the origin and issuer path, then falls back to the previous invalid path.