-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
MFAMethodNotFoundException with SMS MFA required #14013
Comments
Hey, @martinezguillaume 👋. Can you clarify if this is a Gen 1 app (using CLI to provision backend resources like your User Pool) or if this is Gen 2 (CDK, with defineAuth backend file)? Did you require a phone number as an attribute for the User Pool or was MFA and the usage of phone numbers added after the fact? For context, Cognito doesn't support MFA setup for SMS outside of the Hosted UI as well. Also, any frontend code that you can provide tied this authentication flow might be helpful as well. Thanks! |
Hi and thanks for your answer !
The phone attribute is not required, and the MFA was added after. In my case, it's an admin that is creating the user (without a phone), and I would like the user to setup his phone and MFA on first signin (like hosted ui). |
@martinezguillaume, appreciate the additional context. It also sounds like you're using the Authenticator component then based on the packages referenced above. Any chance you could provide that frontend code where the Authenticator is being used or the Auth API's are being called? As stated before, Cognito doesn't support MFA setup for SMS outside of the Hosted UI. Is the admin that's creating these users in the Cognito console also confirming/updating the user beyond their initial creation? |
Before opening, please confirm:
JavaScript Framework
React, React Native
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
None
Environment information
Describe the bug
Hi,
I'm using the package aws-amplify/auth and I have a problem with authentification with SMS MFA.
In the connexion of an user that don't have a phone number yet, it returns an error MFAMethodNotFoundException and it is impossible to login.
I don't have the screen "Set up SMS MFA" existing in the Hosted UI. When I'm trying to use updateUserAttribute to update the user phone attribute, it returns the error UserUnAuthenticatedException.
How can I update the phone of an user, that don't have a phone yet and with SMS MFA required.
Thanks for your help
Expected behavior
When a user don't have the phone attribute define, and with SMS MFA required, it should redirect to a screen like the one in hosted ui after the user tries to signin
Reproduction steps
@aws-amplify/ui-react-native
or@aws-amplify/ui-react
MFAMethodNotFoundException
without the possibility to setup a phone numberCode Snippet
No response
Log output
No response
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
The text was updated successfully, but these errors were encountered: