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
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:
parent
3798e573b6
commit
1831720b24
@ -113,11 +113,17 @@
|
||||
.then(async (response) => {
|
||||
if (response.ok){
|
||||
console.log("Logged In!");
|
||||
var redir = await response.json();
|
||||
if(redir && redir.status === "ok"){
|
||||
console.log("Redirecting");
|
||||
window.location.replace(redir.redirect);
|
||||
} else {
|
||||
try {
|
||||
var redir = await response.json();
|
||||
if(redir && redir.status === "ok"){
|
||||
console.log("Redirecting");
|
||||
window.location.replace(redir.redirect);
|
||||
} else {
|
||||
window.location.replace("/");
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
window.alert('Login Success');
|
||||
window.location.replace("/");
|
||||
}
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user