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

Unable to Implement Email-Based MFA Authentication #13929

Closed
3 tasks done
arpita3112 opened this issue Oct 16, 2024 · 3 comments
Closed
3 tasks done

Unable to Implement Email-Based MFA Authentication #13929

arpita3112 opened this issue Oct 16, 2024 · 3 comments
Assignees
Labels
Auth Related to Auth components/category duplicate If marked with duplicate, issue will be closed & original will be added for traceability feature-request Request a new feature pending-maintainer-response Issue is pending a response from the Amplify team.

Comments

@arpita3112
Copy link

Before opening, please confirm:

JavaScript Framework

React

Amplify APIs

Authentication

Amplify Version

v6

Amplify Categories

auth

Backend

None

Environment information

# Put output below this line


Describe the bug

We are trying to implement MFA (Multi-Factor Authentication) using email-based authentication. We have followed the steps and configured the SDK as per the official documentation:
https://docs.amplify.aws/javascript/start/connect-to-aws-resources/

However, we are still encountering the following error:
signInHelpers.ts:611 Uncaught (in promise) SignInException: An error occurred during the sign in process. EMAIL_OTP challengeName returned by the underlying service was not addressed. at getSignInResult (http://localhost:3000/static/js/bundle.js:85307:9) at signInWithSRP (http://localhost:3000/static/js/bundle.js:82737:85) at async loginBtnClick (http://localhost:3000/main.a99b129….hot-update.js:67:9)

We have reviewed the guide but could only find information related to SMS or TOTP-based MFA:
https://docs.amplify.aws/react/build-a-backend/auth/concepts/multi-factor-authentication/#enable-totp-after-a-user-is-signed-in

We also tried implementing the functionality using amplify/ui-react, but the error persists.

We are using the SDK version :
aws-amplify : v6.6.5

Is there a way to achieve email-based MFA with the above setup? Any guidance or solutions would be greatly appreciated.

Expected behavior

Complete the sign-in process without errors after the correct OTP is entered.

Reproduction steps

  1. First, install the SDK and configure it with Cognito.
  2. After that, call the signIn method from the SDK and pass the email and password.

Code Snippet

  Amplify.configure({
          Auth: {
            Cognito: {
              userPoolId: get(authcredetilas, "userPoolId", null),
              region: get(authcredetilas, "region", null),
              userPoolClientId: get(
                authcredetilas,
                "userPoolWebClientId",
                null
              ),
              identityPoolId: get(authcredetilas, "identityPoolId", null),
              loginWith: {
                email: true,
              },
            },
          },
        });

And

await signIn({
      username: "****",
      password: "****",
    })

Log output

// Put your logs below this line


aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

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 16, 2024
@arpita3112
Copy link
Author

@cwomack
Is there any update on this?

@cwomack cwomack self-assigned this Oct 16, 2024
@cwomack
Copy link
Member

cwomack commented Oct 16, 2024

Hello, @arpita3112 👋. This feature was released by Cognito recently and we are actively working on this feature to be supported within Amplify. We're tracking this feature request in #13837 as well as #5829 on the amplify-ui repo for support on the Authenticator connected component. You can also keep an eye on this feature branch in particular.

Please follow those issues for updates and progress as it's made, and I'll close this one out as a duplicate.

@cwomack cwomack added Auth Related to Auth components/category feature-request Request a new feature labels Oct 16, 2024
@github-actions github-actions bot removed the pending-maintainer-response Issue is pending a response from the Amplify team. label Oct 16, 2024
@cwomack cwomack added duplicate If marked with duplicate, issue will be closed & original will be added for traceability pending-maintainer-response Issue is pending a response from the Amplify team. labels Oct 16, 2024
@github-actions github-actions bot removed the pending-triage Issue is pending triage label Oct 16, 2024
@cwomack cwomack added pending-triage Issue is pending triage and removed pending-maintainer-response Issue is pending a response from the Amplify team. pending-triage Issue is pending triage labels Oct 16, 2024
@cwomack cwomack closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2024
@sators
Copy link

sators commented Oct 21, 2024

Following

@github-actions github-actions bot added the pending-maintainer-response Issue is pending a response from the Amplify team. label Oct 21, 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 duplicate If marked with duplicate, issue will be closed & original will be added for traceability feature-request Request a new feature pending-maintainer-response Issue is pending a response from the Amplify team.
Projects
None yet
Development

No branches or pull requests

3 participants