From a09315070dd6914b8d51e0d94005e11d7a0f49cc Mon Sep 17 00:00:00 2001 From: Timo Glastra Date: Thu, 1 Aug 2024 11:57:43 +0200 Subject: [PATCH] fix(openid4vc): pass client id (#1976) Signed-off-by: Timo Glastra --- .changeset/sweet-dots-speak.md | 5 +++++ .../openid4vc/src/openid4vc-holder/OpenId4VcHolderApi.ts | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/sweet-dots-speak.md diff --git a/.changeset/sweet-dots-speak.md b/.changeset/sweet-dots-speak.md new file mode 100644 index 0000000000..8b5687e6b4 --- /dev/null +++ b/.changeset/sweet-dots-speak.md @@ -0,0 +1,5 @@ +--- +"@credo-ts/openid4vc": patch +--- + +fix: pass the `clientId` in the `requestCredentials` method from the API down to the service diff --git a/packages/openid4vc/src/openid4vc-holder/OpenId4VcHolderApi.ts b/packages/openid4vc/src/openid4vc-holder/OpenId4VcHolderApi.ts index 99461b9913..555ff70dad 100644 --- a/packages/openid4vc/src/openid4vc-holder/OpenId4VcHolderApi.ts +++ b/packages/openid4vc/src/openid4vc-holder/OpenId4VcHolderApi.ts @@ -160,13 +160,14 @@ export class OpenId4VcHolderApi { * @param options.tokenResponse Obtained through @see requestAccessToken */ public async requestCredentials(options: OpenId4VciRequestCredentialOptions) { - const { resolvedCredentialOffer, cNonce, accessToken, ...credentialRequestOptions } = options + const { resolvedCredentialOffer, cNonce, accessToken, clientId, ...credentialRequestOptions } = options return this.openId4VciHolderService.acceptCredentialOffer(this.agentContext, { resolvedCredentialOffer, acceptCredentialOfferOptions: credentialRequestOptions, accessToken, cNonce, + clientId, }) }