I'm using amazon-cognito-identity-js to reset user password. I call user.forgotPassword() and that all works fine, the user receives a verification code, etc.
However, something strange happens when I enter a non-existing username!
I do everything properly, I create a user = new CognitoUser(...) object with my pool and some random username. And then, when I call user.forgotPassword(...), onSuccess is triggered, and I get something like this as a response:
CodeDeliveryDetails: Object { AttributeName: "phone_number", DeliveryMedium: "SMS", Destination: "+*******5651" }
or, if I insist on email recovery instead of SMS:
CodeDeliveryDetails: Object { AttributeName: "email", DeliveryMedium: "EMAIL", Destination: "4***@g***" }
Is Cognito really sending random people SMSs and emails?!? I swear I don't have users with any similar email or phone in my User Pool. O_o