Display more information why has the login failed (#2109)

* Add registration_application_pending and email_not_verified as a toast message

* Fix linting errors

* Fix more linting errors

* Skip key checks on login error

---------

Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
This commit is contained in:
Jarosław 2023-09-02 20:11:46 +03:00 committed by GitHub
parent 0ec0af71bb
commit 38ec8c0b06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -154,9 +154,8 @@ export class Login extends Component<any, State> {
if (loginRes.msg === "missing_totp_token") {
i.setState({ showTotp: true });
toast(I18NextService.i18n.t("enter_two_factor_code"), "info");
}
if (loginRes.msg === "incorrect_login") {
toast(I18NextService.i18n.t("incorrect_login"), "danger");
} else {
toast(I18NextService.i18n.t(loginRes.msg), "danger");
}
i.setState({ loginRes: { state: "failed", msg: loginRes.msg } });