Hello,
I am trying to use the Ionic Auth service to reset passwords through my app by designing my own forms (not using Ionic’s hosted reset form) as described here: https://docs.ionic.io/services/auth/#using-the-client
Here is some source code showing how I request the password reset:
sendReset() {
this.auth.requestPasswordReset(this.emailAddress).then( (res)=> {
//On success
this.resetInProgress = true;
//Pop some toast
let toast = this.toastCtrl.create({
message: 'A password reset email has been sent. Check your inbox!',
duration: 3000
});
toast.present();
}, (rej)=> {
//Pop some toast
let toast = this.toastCtrl.create({
message: 'There was a problem resetting your password. Please try again!',
duration: 3000
});
toast.present();
console.log('Error resetting password: ', rej);
});
}
In the above snippet, this.emailAddress is a string formatted as a valid email address. When a user requests a password reset, they do get an email sent from Ionic, but it looks like this:
This email gets sent to an email address even though I know a user has been created with this email address using the Auth service. Has anybody else run into this? Are there any additional steps needed to get this to work? I followed the Ionic docs exactly and am not sure what I’m missing. I have searched for similar questions and all of them are irrelevant or are different in some way. Here is my ionic info:
global packages:
@ionic/cli-utils : 1.5.0
Cordova CLI : 7.0.1
Ionic CLI : 3.5.0
local packages:
@ionic/app-scripts : 2.0.2
@ionic/cli-plugin-cordova : 1.4.1
@ionic/cli-plugin-ionic-angular : 1.3.2
Cordova Platforms : none
Ionic Framework : ionic-angular 3.5.3
System:
Node : v6.11.1
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
ios-deploy : not installed
ios-sim : not installed
npm : 3.10.10
Any help appreciated, thanks!