Not able to Enable and Verfiy TOTP based MFA token using Cognito

0

Hi, I was trying to write a React code for enabling TOTP based MFA for an user in cognito userpool. but i am not able to enable it. as i tried different code these is the error i am getting .

**Reason: { message: "Code mismatch", code: "EnableSoftwareTokenMFAException", time: "2022-05-04T12:53:02.136Z",… } error: "EnableSoftwareTokenMFAException: Code mismatch" success: false **

i tried google authenticator and microsoft authenticator but still the same error message. sometimes code works but most of the time i am getting this error.

how to resolve this ? what may be the reason for this error ?

here's the link to my codebase i been refering : https://github.com/AlexzanderFlores/Worn-Off-Keys-Cognito-Tutorials/blob/master/10-TOTP-MFA/lambda/get-qr-code/index.js

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions