Description
Before opening, please confirm:
- I have searched for duplicate or closed issues and discussions.
- I have read the guide for submitting bug reports.
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
JavaScript Framework
Not applicable
Amplify APIs
Authentication
Amplify Categories
auth
Environment information
N/A
Describe the bug
Userpool is set up to have required MFA with TOTP only. User confirms email at registration as well as provides unconfirmed phone number. User sets up Authenticator app at registration and successfully confirms sign in. User calls Auth.setPreferredMFA(SMS)(invoking setUserMFAPreference). Request results in SUCCESS. getUser call return SMS_MFA as preferred MFA method. User signs out and tries to log in again. User has SOFTWARE_TOKEN_MFA challenge at log in. AWS Cognito console has SMS_MFA as user’s MFA method.
Expected behavior
Auth.setPreferredMFA('SMS') call should result in error as userpool is configured to have TOTP only.
Reproduction steps
see description
Code Snippet
// Put your code below this line.
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