amazon-cognito-identity-dart-2 icon indicating copy to clipboard operation
amazon-cognito-identity-dart-2 copied to clipboard

"Missing required parameter Session" while MFA is required

Open dhara-seaflux opened this issue 11 months ago • 1 comments

When attempting to authenticate the user in my app, I encountered a CognitoUserMfaRequiredException, indicating that MFA is required for my user pool. Upon receiving this exception, I attempted to send the OTP using the sendMFACode function, but encountered the following error:

flutter: CognitoUserException: "SMS_MFA" flutter: MFA is required: CognitoUserException: "SMS_MFA" flutter: CognitoClientException{statusCode: 400, code: InvalidParameterException, name: InvalidParameterException, message: Missing required parameter Session}

dhara-seaflux avatar Mar 19 '24 11:03 dhara-seaflux

I have the same issue. Upon sending valid credentials, the session is always null so any attempt for TOTP or SMS_MFA fails.

miavorac avatar Mar 31 '24 19:03 miavorac

please check if you have session here: https://github.com/furaiev/amazon-cognito-identity-dart-2/blob/main/lib/src/cognito_user.dart#L931

furaiev avatar Apr 22 '24 20:04 furaiev