Skip to content

Commit

Permalink
fix: Comparison of request subject signing with response was not norm…
Browse files Browse the repository at this point in the history
…alized for a comparison
  • Loading branch information
nklomp committed Jun 11, 2024
1 parent eac1871 commit cd72dc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/client/lib/CredentialRequestClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
Expand Down

0 comments on commit cd72dc6

Please sign in to comment.