MOBILE-3485 login: Reset password input if password change forced

main
Dani Palou 2020-07-15 15:03:02 +02:00
parent b338055f31
commit 0a31ebd2e5
2 changed files with 6 additions and 0 deletions

View File

@ -249,6 +249,9 @@ export class CoreLoginCredentialsPage {
this.loginHelper.treatUserTokenError(siteUrl, error, username, password);
if (error.loggedout) {
this.navCtrl.setRoot('CoreLoginSitesPage');
} else if (error.errorcode == 'forcepasswordchangenotice') {
// Reset password field.
this.credForm.controls.password.reset();
}
}).finally(() => {
modal.dismiss();

View File

@ -221,6 +221,9 @@ export class CoreLoginReconnectPage {
if (error.loggedout) {
this.cancel();
} else if (error.errorcode == 'forcepasswordchangenotice') {
// Reset password field.
this.credForm.controls.password.reset();
}
}).finally(() => {
modal.dismiss();