Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't send the MFA token when user has both of SMS MFA method and Software Token MFA method #13962

Open
4 tasks done
KimThanh27920 opened this issue Oct 25, 2024 · 1 comment
Assignees
Labels
Auth Related to Auth components/category pending-maintainer-response Issue is pending a response from the Amplify team. question General question transferred This issue was transferred from another Amplify project

Comments

@KimThanh27920
Copy link

Before creating a new issue, please confirm:

On which framework/platform are you having an issue?

React

Which UI component?

Authenticator

How is your app built?

React App

What browsers are you seeing the problem on?

Chrome, Microsoft Edge

Which region are you seeing the problem in?

No response

Please describe your bug.

When user has multiple MFA methods, I try to send MFA code with type SOFTWARE_TOKEN_MFA, it always return invalid code error

What's the expected behaviour?

I believe the function should execute successfully and return my token.

Help us reproduce the bug!

Set up both of SMS MFA and Software Token MFA for the user, login normally and enter correct Software Token Code. It return invalid code error

Code Snippet

cognitoUser.sendMFACode(
          verifyCode,
          {
            onSuccess: () => {
               updateChallengeScreen();
               clearLoginProcessCookies();
              setIsSubmitting(false);
            },
            onFailure: function (err) {
              handleSessionExpired(err.message);
              setIsSubmitting(false);
            },
          },
          MFA_TYPE.SOFTWARE_TOKEN_MFA
        );

Console log output

No response

Additional information and screenshots

No response

@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending a response from the Amplify team. labels Oct 25, 2024
@jacoblogan
Copy link
Contributor

@KimThanh27920 Thank you for bringing this issue to our attention. Transferring the issue to aws-amplify/amplify-js repo that handles the underlying functions used by the authenticator component where the error message originates.

@jacoblogan jacoblogan transferred this issue from aws-amplify/amplify-ui Oct 25, 2024
@cwomack cwomack self-assigned this Oct 26, 2024
@cwomack cwomack added Auth Related to Auth components/category transferred This issue was transferred from another Amplify project question General question labels Oct 26, 2024
@github-actions github-actions bot removed the pending-triage Issue is pending triage label Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auth Related to Auth components/category pending-maintainer-response Issue is pending a response from the Amplify team. question General question transferred This issue was transferred from another Amplify project
Projects
None yet
Development

No branches or pull requests

3 participants