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
source share