From cd72dc698108cb1baca9e00c37aa4e6b519a6985 Mon Sep 17 00:00:00 2001 From: Niels Klomp Date: Tue, 11 Jun 2024 21:00:02 +0200 Subject: [PATCH] fix: Comparison of request subject signing with response was not normalized for a comparison --- packages/client/lib/CredentialRequestClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/lib/CredentialRequestClient.ts b/packages/client/lib/CredentialRequestClient.ts index 08309df7..2fc0575c 100644 --- a/packages/client/lib/CredentialRequestClient.ts +++ b/packages/client/lib/CredentialRequestClient.ts @@ -114,7 +114,7 @@ export class CredentialRequestClient { response.access_token = requestToken; if ((uniformRequest.credential_subject_issuance && response.successBody) || response.successBody?.credential_subject_issuance) { - if (uniformRequest.credential_subject_issuance !== response.successBody?.credential_subject_issuance) { + if (JSON.stringify(uniformRequest.credential_subject_issuance) !== JSON.stringify(response.successBody?.credential_subject_issuance)) { throw Error('Subject signing was requested, but issuer did not provide the options in its response'); } }