mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
fix: reset turnstile on login error handling
This commit is contained in:
@@ -69,13 +69,13 @@
|
||||
window.location.href = '/';
|
||||
} else {
|
||||
const resData = await res.json();
|
||||
if (window.turnstile) {
|
||||
window.turnstile.reset();
|
||||
}
|
||||
if (resData.errors) {
|
||||
const messages = Object.values(resData.errors).flat();
|
||||
error = messages.join('\n');
|
||||
} else {
|
||||
if (window.turnstile) {
|
||||
window.turnstile.reset();
|
||||
}
|
||||
if (resData.message === 'TOTP code is required.') {
|
||||
totpEnabled = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user