Show login failure message (#781)

* Show login failure message

* Update resources/scripts/components/auth/LoginContainer.tsx

Co-authored-by: MartinOscar <40749467+RMartinOscar@users.noreply.github.com>

---------

Co-authored-by: MartinOscar <40749467+RMartinOscar@users.noreply.github.com>
This commit is contained in:
Lance Pioch 2024-12-07 22:03:56 -05:00 committed by GitHub
parent 67f1e91236
commit a0f5ef13d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,10 +51,13 @@ const LoginContainer = ({ history }: RouteComponentProps) => {
history.replace('/auth/login/checkpoint', { token: response.confirmationToken });
})
.catch((error) => {
console.error(error);
setSubmitting(false);
addError({ message: 'Invalid login, please try again.' });
setToken('');
if (turnstile) {
turnstile.reset();
}
setSubmitting(false);
clearAndAddHttpError({ error });