unstale

npm / @openid4vc/oauth2

@openid4vc/oauth2

What changed in @openid4vc/oauth2 0.3 to 0.10, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-25.

41 breaking15 security3 deprecations43 new APIs and options7 behavior and defaults19 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.3.1 on npm

@openid4vc/oauth2 0.1022 changes

Breaking changes 14

  • 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; dpop_signing_alg_values_supported rejects none.

    0.10.0release notes

  • @openid4vc/utils removes copies of identity-common helpers; use stringToBytes, bytesToString, base64/base64url helpers and the corresponding same-named identity-common exports.

    0.10.0release notes

  • Requests read responses within CallbackContext fetchLimits, 10 MiB per response by default. Fetch callbacks receive a request type, and fetch-taking functions accept fetchLimits.

    0.10.0release notes

  • fetchWellKnownMetadata now requires a type option: authorizationServerMetadata or credentialIssuerMetadata.

    0.10.0release notes

  • Media types are compared with isMediaType and JOSE typ values with isJwtTyp from @owf/identity-common. ContentType and the old content-type helpers are removed; use CommonMediaTypes and Oauth2MediaTypes.

    0.10.0release notes

  • Oauth2Error, Openid4vciError and Openid4vcBaseError extend IdentityError; their name is their class name, and Oauth2Error and Openid4vciError no longer append the cause message.

    0.10.0release notes

  • Oauth2JwtParseError and Oauth2JwtVerificationError are removed. Catch the exported @owf/jose errors; catch IdentityError to handle both those errors and IdentityError-derived errors.

    0.10.0release notes

  • JWT, JWK, JWA and JWS helpers are no longer exported from @openid4vc/oauth2; import the listed replacements from @owf/jose, including renamed signer and algorithm-conversion APIs.

    0.10.0release notes

  • CallbackContext replaces signJwt and verifyJwt with signJws and verifyJws; these sign or verify the signing input and return the public key used.

    0.10.0release notes

  • The @openid4vc packages use ValidationError from @owf/identity-common, with issues instead of zodError; formatZodError is removed.

    0.10.0release notes

  • Attestations signed with a jwk signer are rejected. Use x5c, a federation trust_chain, a DID, or another kid resolved and trusted by verifyJws.

    0.10.0release notes

  • DPoP proofs are time-limited by default; maxProofAgeSeconds allows skew, future iat values are rejected, and jti uniqueness is checked after signature verification.

    0.10.0release notes

  • verifyJwt now takes jwt, verifyJwsCallback and skewSeconds; checkExpirationTime, checkNotBefore and checkIssuedAt replace skipTimeBasedValidation.

    0.10.0release notes

  • JWT verification is stricter: it rejects future-issued or expired-at-expiry tokens, missing expected audiences, disallowed algorithms, ambiguous signer headers, unknown JWKS kids, malformed base64url, private JWKs and unsupported crit values.

    0.10.0release notes

Security 5

  • Authorization request verification APIs accept registered allowedRedirectUris and require an exact match; redirect_uri may be omitted only when a single URI is registered.

    0.10.0release notes

  • Client attestation verification and relevant authorization and access-token request options accept expectedChallenge, allowing servers to enforce an issued challenge.

    0.10.0release notes

  • DPoP verification APIs accept expectedNonce so servers can require a nonce for authorization and resource requests; proofs older than 300 seconds are rejected unless maxProofAgeSeconds allows more.

    0.10.0release notes

  • Authorization code access-token verification accepts expectedRedirectUri and requires the request redirect_uri to identically match the URI used when the code was issued.

    0.10.0release notes

  • A jwt credential proof with an iat more than 300 seconds ago is rejected.

    0.10.0release notes

New APIs and options 1

  • JWT verification takes now and allowedSkewInSeconds, defaulting to 30 seconds; resource servers and OAuth/OpenID clients, issuers and verifiers also take a default allowedSkewInSeconds.

    0.10.0release notes

Fixes and other changes 2

  • Client ID and secret are form-url-encoded, then base64-encoded with padding rather than base64url-encoded, to comply with the specified Basic authentication format.

    0.10.0release notes

  • JWT typ values are accepted in any casing and with the application/ prefix; compare them with isJwtTyp from @owf/identity-common.

    0.10.0release notes

@openid4vc/oauth2 0.97 changes

Breaking changes 1

  • Now requires request or request_uri, preventing unsigned requests from bypassing validation, including the https check on response_uri.

    0.9.2release notes

Security 1

  • Rejects opaque access tokens when introspection reports active: false, preventing revoked, expired, or unknown tokens from passing verification.

    0.9.0release notes

New APIs and options 4

  • Added an error code for unknown notification ids.

    0.9.1release notes

  • Added as the error code thrown when a Notification Request is invalid.

    0.9.1release notes

  • Added a method to validate a Notification Request at the issuer's notification endpoint.

    0.9.1release notes

  • Exported so consumers can name the return type of access token retrieval methods.

    0.9.1release notes

Behavior and default changes 1

  • Sends expected content types in the Accept header unless the request already sets one; the first content type is preferred and later ones receive decreasing q values.

    0.9.0release notes

@openid4vc/oauth2 0.811 changes

Breaking changes 2

  • Parsed header types now expose typ as string and preserve the value as sent.

    0.8.1release notes

  • The function now requires the hash callback.

    0.8.0release notes

Security 4

  • Fixes the cnf claim of a DPoP-bound access token on Hermes, where it could be a thumbprint string instead of an object containing jkt.

    0.8.0release notes

  • Always returns a valid header value by replacing control and non-ASCII characters with spaces and truncating error_description values longer than 500 characters, preventing header injection or errors when setting the header.

    0.8.0release notes

  • Authorization requests, token requests, and client-attestation verification accept this option to reject a client attestation for another client id.

    0.8.0release notes

  • Authorization requests, token requests, and client-attestation verification accept this option to reject a client attestation for another key; pass the thumbprint from an earlier request in later requests.

    0.8.0release notes

New APIs and options 3

  • Adds a helper for checking JWT typ values against the accepted forms.

    0.8.1release notes

  • Adds a schema that uses the JWT typ check.

    0.8.1release notes

  • verifyClientAttestationJwt now returns the thumbprint of the client attestation's cnf key, which can be passed in later requests to bind authorization sessions and refresh tokens to the client instance key.

    0.8.0release notes

Fixes and other changes 2

  • JWT typ headers accept the full media type form and any casing across the listed JWT uses; created JWTs still use the short lowercase form.

    0.8.1release notes

  • Now unescapes every escaped character in a quoted string, rather than only an escaped quote.

    0.8.0release notes

@openid4vc/oauth2 0.77 changes

Breaking changes 1

  • Renames the DPoP option allowedClockSkewSeconds to allowedSkewInSeconds across the listed verification methods.

    0.7.0release notes

New APIs and options 2

  • Adds an optional clientAttestation verification option, defaulting to 0, for nbf and exp checks on both Client Attestation JWTs and PoP JWTs.

    0.7.0release notes

  • Adds a server-level default allowed clock skew for DPoP and client attestation verification; per-call options override it, including 0.

    0.7.0release notes

Fixes and other changes 4

  • Normalizes the proof htu claim like the request URL before comparison, ignoring query and fragment and avoiding mismatches from uppercase hosts or explicit default ports.

    0.7.0release notes

  • The verify*AccessTokenRequest methods now pass now to DPoP proof verification, so iat checks use the provided time rather than the current time.

    0.7.0release notes

  • The method now honors its allowedSkewInSeconds option, which was previously ignored.

    0.7.0release notes

  • Accepts the URL scheme case-insensitively.

    0.7.0release notes

@openid4vc/oauth2 0.67 changes

Breaking changes 5

  • A missing code_verifier in an access token request for an authorization code bound to a PKCE challenge now produces invalid_grant instead of invalid_request.

    0.6.0release notes

  • An access token request containing code_verifier but lacking pkce options in the verify function now fails with invalid_grant, preventing a PKCE downgrade attack.

    0.6.0release notes

  • allowRequestUri now defaults to false in parseJarRequest and validateJarRequestParams; request-by-reference JAR requests are rejected unless the option is explicitly set to true.

    0.6.0release notes

  • Pushed and interactive authorization requests containing request_uri are rejected with invalid_request instead of fetching the URI.

    0.6.0release notes

  • Schema validation failures for client attestation and client attestation PoP JWTs now report invalid_client with status 401, including for the attest_jwt_client_auth_dpop method.

    0.6.0release notes

Fixes and other changes 2

  • Undefined error, error_description, and scope payload entries are omitted from the WWW-Authenticate header; null values remain encoded as bare parameter names.

    0.6.0release notes

  • Authorization header authentication schemes are matched case-insensitively and resolved to their canonical form during verification.

    0.6.0release notes

@openid4vc/oauth2 0.538 changes

Breaking changes 6

  • The package's main field now points to the ESM build.

    0.5.6release notes

  • The package remains ESM-only; require('@openid4vc/oauth2') loads the ESM build and requires Node.js 20.19 or later, or 22.12 or later.

    0.5.6release notes

  • The Client Attestation PoP JWT no longer includes the exp claim.

    0.5.2release notes

  • Removes the exp field from the wallet attestation JWT payload schema.

    0.5.0release notes

  • Grant types are parsed and verified against grant_types_supported, so authorization servers must configure it correctly.

    0.5.0release notes

  • Node 18 support is dropped; Node.js 20.19+ is now the lowest supported version.

    0.5.0release notes

Security 3

  • An optional callback can provide replay protection by asserting JTI uniqueness.

    0.5.6release notes

  • Adds authorization-server verification of the combined method, requiring the attestation JWT and DPoP proof to have a matching cnf JWK; rejects it if the server does not advertise the method.

    0.5.4release notes

  • Added expectedAudience so a resource server can verify a PoP JWT bound to its own identifier.

    0.5.2release notes

Deprecations 3

  • The expectedNonce option is a deprecated alias for expectedChallenge.

    0.5.2release notes

  • The nonce option is a deprecated alias for challenge.

    0.5.2release notes

  • Deprecated in favor of allowedSkewInSeconds for better naming consistency.

    0.5.0release notes

New APIs and options 21

  • DPoP verification can optionally account for configured clock skew.

    0.5.6release notes

  • DPoP verification options are available through access-token, authorization-request, and resource-request verification APIs.

    0.5.6release notes

  • DPoP verification can optionally reject proofs older than the configured maximum age.

    0.5.6release notes

  • Type declarations are exposed through the package's types export condition.

    0.5.6release notes

  • @openid4vc/oauth2 now exports the VerifyClientAttestationOptions type.

    0.5.6release notes

  • Add an optional callback to resolve authorization server metadata without a request; returning null indicates the metadata definitively does not exist.

    0.5.5release notes

  • Add an optional callback to resolve JWK Sets without a request; returned values are validated with the JWK Set schema.

    0.5.5release notes

  • The second parameter also accepts an object with fetch and the matching resolve callback, in addition to the previously accepted Fetch implementation.

    0.5.5release notes

  • Adds a client-auth callback that emits a single DPoP proof doubling as the Client Attestation PoP, with the client instance key equal to the DPoP key.

    0.5.4release notes

  • Credential requests support di_vp proofs.

    0.5.3release notes

  • Fetches a Client Attestation challenge from the authorization server's challenge_endpoint.

    0.5.3release notes

  • Supports reactive challenge retry so the challenge is automatically included in the Client Attestation PoP when the server requests one.

    0.5.3release notes

  • Added the attest_jwt_client_auth_dpop authentication method.

    0.5.2release notes

  • Added the challenge_endpoint authorization server metadata parameter.

    0.5.2release notes

  • Added an authorization server metadata parameter for supported Client Attestation PoP signing algorithms.

    0.5.2release notes

  • Added an authorization server metadata parameter for supported client attestation signing algorithms.

    0.5.2release notes

  • Added the OAuth-Client-Attestation-Challenge header.

    0.5.2release notes

  • Exports the CreateCredentialResponseOptions type.

    0.5.0release notes

  • Adds experimental support for the OpenID4VCI 1.1 draft endpoint, allowing presentation during issuance; it may change incompatibly in a patch release.

    0.5.0release notes

  • Adds support for request and response encryption.

    0.5.0release notes

  • Accepts allowedSkewInSeconds for clock-skew handling.

    0.5.0release notes

Behavior and default changes 2

  • The Client Attestation PoP JWT uses the challenge claim instead of nonce, and verification accepts either claim.

    0.5.2release notes

  • Client Attestation and Client Attestation PoP JWTs no longer emit the iss claim; verification still accepts legacy JWTs that include it.

    0.5.2release notes

Fixes and other changes 3

  • Errors thrown by @openid4vc/oauth2 can now pass instanceof checks against the ValidationError class exported by @openid4vc/utils.

    0.5.6release notes

  • Adds support for Node 26.

    0.5.0release notes

  • Makes an exception for this JWT typ when the iss value does not match the DID in the JWT proof header.

    0.5.0release notes

@openid4vc/oauth2 0.47 changes

Breaking changes 2

  • Metadata retrieval now throws an error if an error was thrown during the first try.

    0.4.4release notes

  • Support for CommonJS/CJS syntax was removed; the package is now fully an ESM module.

    0.4.0release notes

Security 1

  • Adds a wallet method to parse and verify an authorization response redirect URL against authorization server metadata.

    0.4.4release notes

New APIs and options 2

  • The package now supports retrieving a client credentials access token.

    0.4.5release notes

  • Set this authorization server metadata value to true to meet HAIP requirements for RFC 9207 issuer identification.

    0.4.4release notes

Fixes and other changes 2

  • JWT claims iat, nbf, and exp now allow decimal numbers.

    0.4.5release notes

  • Zod errors include more detail for nested errors.

    0.4.4release notes

@openid4vc/oauth2 0.329 changes

Breaking changes 10

  • The JWE encryptor now base64-encodes apu values to align with JOSE.

    0.3.0release notes

  • The JWE encryptor now base64-encodes apv values to align with JOSE.

    0.3.0release notes

  • Corrects the parameter name from authorizationServerMetata to authorizationServerMetadata.

    0.3.0release notes

  • Replaces the dpopJwk return value with a dpop object containing jwk, and adds jwkThumbprint.

    0.3.0release notes

  • Renames the JWT signer method trustChain to federation and makes the trustChain variable optional.

    0.3.0release notes

  • Changes the JWK key_ops field to an array of strings instead of a string.

    0.3.0release notes

  • Adds kid to the JwtSigner interface.

    0.3.0release notes

  • Adds support for OpenID4VCI draft 15, with improved support for client attestations and server-side verification. Callers must handle differences between draft versions.

    0.3.0release notes

  • Renames SHA-256 to sha-256 to align with IANA hash algorithm names.

    0.3.0release notes

  • Data validation transitions from Valibot to Zod, breaking packages that re-exported Valibot types or schemas; error messages and some error structures also change.

    0.3.0release notes

Security 1

  • Pass authorizationRequestJwt to this method to ensure the JWT is verified.

    0.3.0release notes

New APIs and options 10

  • Adds a function to parse authorization response redirect URLs.

    0.3.0release notes

  • Adds support for deferred credential issuance.

    0.3.0release notes

  • Adds grant_types_supported to authorization server metadata.

    0.3.0release notes

  • Adds support for parsing and verifying an ID Token JWT according to the OpenID Connect specification.

    0.3.0release notes

  • Adds support for JAR in pushed authorization requests.

    0.3.0release notes

  • May now return authorizationRequestJwt; pass it to verifyPushedAuthorizationResponse to ensure the JWT is verified.

    0.3.0release notes

  • Adds a function to parse a pushed authorization request URI.

    0.3.0release notes

  • Adds authorization server support for refresh tokens and verifying requests with refresh token grants.

    0.3.0release notes

  • Adds support for the sha-384 hash algorithm.

    0.3.0release notes

  • Adds support for the sha-512 hash algorithm.

    0.3.0release notes

Behavior and default changes 4

  • Draft 11 remains supported using Draft 14 syntax and is automatically converted.

    0.3.0release notes

  • Allows application/json as a content type for JWK Set.

    0.3.0release notes

  • Adds support for Node.js 22 and 24.

    0.3.0release notes

  • Sends redirect_uri along in the authorization challenge endpoint so the server can use it when defaulting to a PAR request.

    0.3.0release notes

Fixes and other changes 4

  • Adds support for parsing and verifying JWTs with an array aud value.

    0.3.0release notes

  • Adds support for Draft 16 of the OpenID for Verifiable Credential Issuance.

    0.3.0release notes

  • Retrieves OAuth authorization server metadata from the correct well-known path first, then falls back to the invalid path.

    0.3.0release notes

  • Passes state to the authentication challenge request and onto the authorization request URL.

    0.3.0release notes