1
0
mirror of https://github.com/flarum/core.git synced 2025-08-04 15:37:51 +02:00

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

* 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
2 changed files with 1 additions and 2 deletions

View File

@@ -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);

View File

@@ -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);