I am using AWS Cognito's forgot password API and it is working fine. But I am facing an issue when I sign up with the mobile number, and later on, I add an email attribute to that user pool record and call forgot password API it sends a verification code on the 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.