Add reCAPTCHA reset for login with wrong credentials

pull/3608/head
Daniel Lun 2024-11-25 15:43:02 -08:00
parent 2fdea73430
commit 720517b20d
1 changed files with 3 additions and 0 deletions

View File

@ -107,6 +107,9 @@ const submit = async (event: Event) => {
error.value = t("login.usernameTaken"); error.value = t("login.usernameTaken");
} else if (e.status === 403) { } else if (e.status === 403) {
error.value = t("login.wrongCredentials"); error.value = t("login.wrongCredentials");
if (recaptcha) {
window.grecaptcha.reset();
}
} else { } else {
$showError(e); $showError(e);
} }