Refactor; Fix CORS when login via passkeys
Some checks are pending
Build and Upload Binary / build (x86_64-unknown-linux-musl-rust-auth, auth, x86, stable, x86_64-unknown-linux-musl) (push) Waiting to run

This commit is contained in:
mortis-0 2024-03-16 20:03:37 +08:00
parent 3798e573b6
commit 1831720b24

View File

@ -113,6 +113,7 @@
.then(async (response) => {
if (response.ok){
console.log("Logged In!");
try {
var redir = await response.json();
if(redir && redir.status === "ok"){
console.log("Redirecting");
@ -120,6 +121,11 @@
} else {
window.location.replace("/");
}
} catch (e) {
console.log(e);
window.alert('Login Success');
window.location.replace("/");
}
} else {
console.log("Error");
}