From 3b0971db8302a977550b403e6611ec53be34f1dd Mon Sep 17 00:00:00 2001 From: Mirko Mollik Date: Wed, 26 Jun 2024 19:05:57 +0200 Subject: [PATCH] fix: update tx_code check add correct check for tx code check --- packages/issuer/lib/tokens/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/issuer/lib/tokens/index.ts b/packages/issuer/lib/tokens/index.ts index a7f6f66d..e0a59b34 100644 --- a/packages/issuer/lib/tokens/index.ts +++ b/packages/issuer/lib/tokens/index.ts @@ -110,7 +110,7 @@ export const assertValidAccessTokenRequest = async ( invalid_request: the Authorization Server does not expect a PIN in the pre-authorized flow but the client provides a PIN */ - if (!credentialOfferSession.credentialOffer.credential_offer?.grants?.[GrantTypes.PRE_AUTHORIZED_CODE]?.user_pin_required && request.user_pin) { + if (!credentialOfferSession.credentialOffer.credential_offer?.grants?.[GrantTypes.PRE_AUTHORIZED_CODE]?.tx_code && request.user_pin) { throw new TokenError(400, TokenErrorResponse.invalid_request, USER_PIN_NOT_REQUIRED_ERROR) } /*