Skip to content

Commit

Permalink
fix: update tx_code check
Browse files Browse the repository at this point in the history
add correct check for tx code check
  • Loading branch information
cre8 authored Jun 26, 2024
1 parent 40ad1de commit 3b0971d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/issuer/lib/tokens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
/*
Expand Down

0 comments on commit 3b0971d

Please sign in to comment.