Changelog
Release notes for the @mattrglobal/verifier-sdk-web package.
2.3.0
Features
- Added an optional onPresentationRequest parameter to requestCredentials(). The hook is invoked once after the presentation session is created, and again each time the OpenID4VP authorization request URI is regenerated, for example when a cross-device QR code refreshes. Use it to perform operations against the current request. It is supported in same-device, cross-device, and Digital Credentials API sessions.
If the hook throws, or the promise it returns rejects on any invocation, the in-progress presentation is aborted. The session is aborted server-side, and for cross-device sessions the iframe is closed. requestCredentials() then resolves with a new OnPresentationRequestFailed error (RequestCredentialsErrorType.OnPresentationRequestFailed).
Fixes
- Fixed an issue where slow verifications were being reported as failures. The SDK now waits up to 15 seconds for a verification to complete before timing out, up from 3 seconds.
2.2.0
Features
- Added an optional
stateparameter torequestCredentials(). Pass an opaque correlation reference, such as an internal record ID, to link a verification session to a record in your own system without maintaining a separatesessionIdmapping. MATTR VII carries the value through the session and returns it with the result in both same-device and cross-device flows, on both successful and failed results. See Correlating verification sessions with your system.
2.1.1
Updated internal dependencies to address known vulnerabilities and improve overall security stability.
2.1.0
This is a maintenance release. It includes code refactoring and improvements to support future capabilities.
2.0.2
Documentation
- Updated installation documentation with version-specific script link.
2.0.1
Fixes
- Export
OpenIdvpConfigurationtype for requestCredentials options
2.0.0
BREAKING CHANGES
-
intialisemethod:- The
intialisemethod was renamed toinitialize - The
InitialiseOptionstype was renamed toInitializeOptions - The
initializemethod now requires providing anapplicationIdto identify a specific web application interacting with the MATTR VII verifier tenant.
- The
-
The values in the
Modeenum were renamed to use PascalCase:crossDevicewas renamed toCrossDevicesameDevicewas renamed toSameDevice
-
requestCredentialsmethod:- The method no longer accepts a union of
RequestCredentialsSameDeviceOptions,RequestCredentialsCrossDeviceDeviceOptions, andRequestCredentialsAutoDetectOptions. Instead,walletProviderId,mode, andredirectUriare grouped inside an optionalopenid4vpConfigurationattribute which can be used to differentiate between presentation modes:- for openid4vp in same device mode: provide
modeasSameDeviceand provideredirectUri - for openid4vp in cross device mode: provide
modeasCrossDeviceand omitredirectUri - for openid4vp in auto-detect mode: omit
modeand provideredirectUri
- for openid4vp in same device mode: provide
- For cross-device flow, the method no longer accept the
crossDeviceCallbackoption which contains theonCompleteandonFailurecallback functions. Instead the function will await for the session to complete and return aResult. TheResultwill contain the presentation result on success, or an error with the failure reason. - For same-device flow, the method will automatically close the current browser window on success as the verification
process continues on a separate redirect page. Please be mindful, this only works for windows that were opened by a
script using the
Window.open()method, or on top-level windows that have a single history entry. The returned value now contains asessionCompletedInRedirect: trueproperty to indicate if the flow has continue on the redirect page.
- The method no longer accepts a union of
-
Invalid credentials included in presentations will no longer result in a
PresentationFailureResult, but instead aPresentationSuccessResultcontaining details of which credentials have failed verification and why. The verification response structure was updated to allow this:MobileCredentialVerificationReasonTypenow includes a number of extra possible values:TrustedIssuerCertificateExpired,TrustedIssuerCertificateNotYetValid,IssuerNotTrusted,MobileCredentialInvalid,MobileCredentialExpired,MobileCredentialNotYetValid,InvalidSignerCertificate,DeviceKeyInvalid,UnsupportedCurve,StatusRevoked,StatusSuspended,StatusUnknownand no longer includesexpired,inactive,invalid,suspended,unknown
Features
- Added
abortCredentialRequestmethod for aborting the currently active credentials request session. Any in-progressrequestCredentialsinvocation will resolve immediately with an error result with theRequestCredentialsErrorType.Aborterror type.
1.1.0
- The
initialisemethod now takes an optionalapplicationIdto identify a specific web application interacting with the MATTR VII verifier tenant. CrossDeviceCallbackOnCompleteResponseandHandleRedirectCallbackResponsewill return sessionId on the top levelMobileCredentialVerificationReasonTypenow includes values specific to mobile credential revocation status:StatusRevoked,StatusSuspended,StatusUnknown
1.0.1
Documentation
- Updated installation documentation with version specific script link.
1.0.0
Features
- Request Mobile Credentials for verification from a web application via a MATTR VII tenant with use of OpenID4VP as defined in ISO-18013-7.
- Support for both cross-device and same-device flows.
How would you rate this page?