Sachin Singh
Sachin Singh

Reputation: 7225

AWS cognito forgot password API issue

I am using AWS Cognito's forgot password API its working fine. But i am facing one issue. I sign up with mobile number, and later on I add email attribute to that user pool record and call forgot password API it sends verification code on mobile number, but i want it to send it on Email, how can i do this? Here is my Code.

AWS_COGNITO.forgot_password({ client_id: ENV['AWS_WEB_APP_ID'], username: 'valid username'})

The #forgot_password takes only two values in hash as per API document

Please let me know if any more information is required from me. Thanks

Upvotes: 5

Views: 795

Answers (1)

Sangharsh
Sangharsh

Reputation: 3019

Edit: As per following docs, MFA via email is not supported yet.

  1. https://github.com/aws/aws-sdk-ios/issues/382
  2. [Jan 17, 2017] https://forums.aws.amazon.com/message.jspa?messageID=762060

Check user details using get_user

If mfa_options[0].delivery_medium is 'SMS', call set_user_settings to update delivery medium to 'EMAIL'.

Upvotes: 3

Related Questions