AWS cognito forgot password API question

I am using the AWS Cognito API for forgotten passwords . But I ran into one problem. I will register a mobile phone number, and later add an email attribute to this user pool entry and call forgot password API sends the verification code to the mobile number, but I want it to send it by email, how can I do it? Here is my code.

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

#forgot_password accepts only two values ​​in a hash by an API document

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

+5
source share
1 answer

Edit: According to the following documents, email MFA is not yet supported.


Verify user data using get_user

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

+3
source

Source: https://habr.com/ru/post/1263208/


All Articles