refactor: use window.location.href for redirects

This commit is contained in:
Stavros
2025-01-28 19:08:00 +02:00
parent 3efcb26db1
commit e2e3b3bdc6
4 changed files with 70 additions and 27 deletions

View File

@@ -65,8 +65,12 @@ export const LoginPage = () => {
color: "green",
});
setTimeout(() => {
window.location.replace(`/continue?redirect_uri=${redirectUri}`);
});
if (redirectUri === "null") {
window.location.replace("/");
} else {
window.location.replace(`/continue?redirect_uri=${redirectUri}`);
}
}, 500);
},
});
@@ -84,7 +88,14 @@ export const LoginPage = () => {
});
},
onSuccess: (data) => {
window.location.replace(data.data.url);
notifications.show({
title: "Redirecting",
message: "Redirecting to your OAuth provider",
color: "blue",
});
setTimeout(() => {
window.location.href = data.data.url;
}, 500);
},
});