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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user