diff --git a/dashboard/src/components/Login.vue b/dashboard/src/components/Login.vue index f4d83cb14..44fd037ae 100644 --- a/dashboard/src/components/Login.vue +++ b/dashboard/src/components/Login.vue @@ -49,12 +49,13 @@ async function onSubmit() { passwordError.value = true; document.getElementById('inputPassword').focus(); } + } else if (res.status === 200 ) { + if (res.body.redirectTo) return window.location.href = res.body.redirectTo; + console.error('login success but missing redirectTo in data:', res.body); + internalError.value = true; + } else { + internalError.value = true; } - - if (res.body.redirectTo) return window.location.href = res.body.redirectTo; - - internalError.value = true; - console.error('login success but missing redirectTo in data:', res.body); } catch (error) { internalError.value = true; console.error(error); @@ -98,6 +99,7 @@ onMounted(async () => {

{{ $t('login.errorIncorrectCredentials') }}

{{ $t('login.errorInternal') }}

+

{{ $t('login.errorIncorrect2FAToken') }}

@@ -122,7 +124,6 @@ onMounted(async () => {
-

{{ $t('login.errorIncorrect2FAToken') }}