Skip to content

Commit

Permalink
Clear login and password after successful login
Browse files Browse the repository at this point in the history
And clear password fields after failed attempts
  • Loading branch information
arnaud-morvan committed Sep 26, 2019
1 parent 2203381 commit ae36d3c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contribs/gmf/src/authentication/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ class AuthenticationController {
);
})
.catch((err) => {
this.oldPwdVal = '';
this.setError_(gettextCatalog.getString('Incorrect old password.'));
});
}
Expand All @@ -354,9 +355,12 @@ class AuthenticationController {
} else {
this.gmfAuthenticationService_.login(this.loginVal, this.pwdVal)
.then(() => {
this.loginVal = '';
this.pwdVal = '';
this.resetError_();
})
.catch(() => {
this.pwdVal = '';
this.setError_(gettextCatalog.getString('Incorrect credentials or disabled account.'));
});
}
Expand Down

0 comments on commit ae36d3c

Please sign in to comment.