Skip to content

Commit 3b0971d

Browse files
authored
fix: update tx_code check
add correct check for tx code check
1 parent 40ad1de commit 3b0971d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/issuer/lib/tokens/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export const assertValidAccessTokenRequest = async (
110110
invalid_request:
111111
the Authorization Server does not expect a PIN in the pre-authorized flow but the client provides a PIN
112112
*/
113-
if (!credentialOfferSession.credentialOffer.credential_offer?.grants?.[GrantTypes.PRE_AUTHORIZED_CODE]?.user_pin_required && request.user_pin) {
113+
if (!credentialOfferSession.credentialOffer.credential_offer?.grants?.[GrantTypes.PRE_AUTHORIZED_CODE]?.tx_code && request.user_pin) {
114114
throw new TokenError(400, TokenErrorResponse.invalid_request, USER_PIN_NOT_REQUIRED_ERROR)
115115
}
116116
/*

0 commit comments

Comments
 (0)