Files
floci/docs
outofplace d0e0af502b feat(cognito): support SMS and email MFA challenges (#5104)
SetUserPoolMfaConfig validated SmsMfaConfiguration and
EmailMfaConfiguration but stored neither, SMSMfaSettings was ignored,
and no MFA code was ever sent, so a user who picked SMS or email as a
second factor signed in without one.

- SetUserPoolMfaConfig stores both configurations, GetUserPoolMfaConfig
  returns them, and OFF drops them. SmsMfaConfiguration also sets the
  pool's SmsAuthenticationMessage and SmsConfiguration.
- A pool offers SMS MFA once it has an SmsMfaConfiguration or an
  SmsConfiguration from CreateUserPool or UpdateUserPool, as AWS makes
  SMS an MFA factor for any pool with an SMS configuration.
- SetUserMFAPreference and AdminSetUserMFAPreference store
  SMSMfaSettings. Turning SMS or email MFA on for a user without a
  phone_number or email fails with InvalidParameterException.
  UserMFASettingList and PreferredMfaSetting report SMS_MFA.
- After a password or SRP first factor, the user's factors follow the
  developer guide's MFA logic: with OPTIONAL the factors the user turned
  on, with ON every factor the pool offers and the user can receive. The
  preferred factor's challenge follows, the only factor's, or
  SELECT_MFA_TYPE between several.
- SMS_MFA sends a code through SNS with SmsAuthenticationMessage. Email
  MFA is the EMAIL_OTP challenge, a code through SES with
  EmailMfaConfiguration's subject and message, which also carry the
  USER_AUTH EMAIL_OTP sign-in code once set. Both fire the CustomMessage
  trigger with CustomMessage_Authentication, and a right code marks the
  phone number or email address verified.
- In USER_AUTH, a user with such a factor in an optional-MFA pool is
  offered only password challenges.

Closes #5182
2026-10-15 23:38:41 -04:00
..
2026-03-15 17:43:56 -05:00