chore: don't pass password field between auth modals ()

* chore: don't pass password field between auth modals
* chore: reset password on failed attempts
* chore: `yarn format`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
This commit is contained in:
Sami Mazouz 2022-09-05 13:44:11 +01:00 committed by GitHub
parent 6e48a0303e
commit 3b773e2677
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions
framework/core/js/src/forum/components

@ -158,7 +158,6 @@ export default class LogInModal<CustomAttrs extends ILoginModalAttrs = ILoginMod
const attrs = {
[identification.includes('@') ? 'email' : 'username']: identification,
password: this.password(),
};
app.modal.show(SignUpModal, attrs);
@ -185,6 +184,7 @@ export default class LogInModal<CustomAttrs extends ILoginModalAttrs = ILoginMod
onerror(error: RequestError) {
if (error.status === 401 && error.alert) {
error.alert.content = app.translator.trans('core.forum.log_in.invalid_login_message');
this.password('');
}
super.onerror(error);

@ -149,7 +149,6 @@ export default class SignUpModal<CustomAttrs extends ISignupModalAttrs = ISignup
logIn() {
const attrs = {
identification: this.email() || this.username(),
password: this.password(),
};
app.modal.show(LogInModal, attrs);