2FA on login page

This commit is contained in:
Madeline
2022-07-20 21:21:45 +10:00
parent 02bb548953
commit c07950570c
2 changed files with 35 additions and 4 deletions
+12
View File
@@ -16,6 +16,18 @@ const handleSubmit = async (path, body) => {
return;
}
if (json.ticket) {
// my terrible solution to 2fa
const twoFactorForm = document.forms["2fa"];
const loginForm = document.forms["login"];
twoFactorForm.style.display = "flex";
loginForm.style.display = "none";
twoFactorForm.ticket.value = json.ticket;
return;
}
// Very fun error message here lol
const error =
json.errors