From 38ec8c0b062fa28b18aa4a1a4af73d8d7b561fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw?= Date: Sat, 2 Sep 2023 20:11:46 +0300 Subject: [PATCH] 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 --- src/shared/components/home/login.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/shared/components/home/login.tsx b/src/shared/components/home/login.tsx index ad5afcab..05ee1cfb 100644 --- a/src/shared/components/home/login.tsx +++ b/src/shared/components/home/login.tsx @@ -154,9 +154,8 @@ export class Login extends Component { 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 } });