SOFTWARE_TOKEN_MFA fails if try to use Custom Auth Challenge Lambda Triggers

Viewed 215

I have a question with AWS Cognito: Initially, the UserPool and the UserPool Client were configured by default to:

authenticationFlowType: 'USER_SRP_AUTH'

users were also allowed to use MFA

Right now we decided to switch to Custom Auth Challenge Lambda Triggers

authenticationFlowType: 'CUSTOM_AUTH'

to add specific logic for authentication

and unfortunately faced with the fact that SOFTWARE_TOKEN_MFA falls off, the answer from AWS Cognito is now different (instead of information about device comes next step for CUSTOM_AUTH) and Amplify throws an error:

Cannot read properties of undefined (reading 'NewDeviceMetadata')

Is it even possible to use SOFTWARE_TOKEN_MFA with Custom authentication challenge Lambda triggers and if yes, how to do this correct?

UPD: I created issue/bug report at Amplify repo with full description

0 Answers
Related