iNono
November 12, 2016, 8:21pm
1
Hi,
I’m trying to implement the Ionic Cloud Auth Service and now I want to do the password reset like it is described here . So I have a text field where the user can enter his email and a button. If the button is tapped I call this function:
email: any;
sendPasswordRequest() {
this.auth.requestPasswordReset(this.email);
this.navCtrl.push(ConfirmPasswordResetPage);
}
And the form looks like this:
<ion-item>
<ion-label color="primary" stacked>E-Mail</ion-label>
<ion-input [(ngModel)]="email"></ion-input>
</ion-item>
<button ion-button (click)="sendPasswordRequest();">New Password</button>
But I get the following error when I press the button:
Someone know what is wrong? Or is this an known problem? Or can someone explain me how it works with the second way ? The documentation dont really gives much infos…
ramon
November 16, 2016, 3:33pm
2
Same problem here.
My resetPassword function:
resetPassword() {
let toastOptions = {
position: "top",
showCloseButton: true,
closeButtonText: "ok",
duration: 4000
};
let toast: any;
if(this.email.length){
this.auth.requestPasswordReset(this.email).then(
() => {
this.navCtrl.push(ConfirmPasswordResetPage);
},(err) => {
console.log(err);
toastOptions['message'] = "Invalid email!";
toast = this.toastCtrl.create(toastOptions);
toast.present();
}
);
} else {
toastOptions['message'] = "Empty email!";
toast = this.toastCtrl.create(toastOptions);
toast.present();
}
}
My system information:
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.2
Ionic CLI Version: 2.1.8
Ionic App Lib Version: 2.1.4
Ionic App Scripts Version: 0.0.43
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: macOS Sierra
Node Version: v5.11.1
Xcode version: Xcode 8.1 Build version 8B62
Any help will be apreciated @mhartington .
Thanks in advance.
ramon
November 22, 2016, 2:30pm
3
There is the GitHub related issue:
ramon
November 28, 2016, 11:34am
4
Solved upgrading @ionic /cloud-angular to 0.8.0.
Update version on package.json…
“@ionic /cloud-angular”: “^0.8.0”
… and run:
npm install
Fix commit:
committed 06:57PM - 22 Nov 16 UTC