diff --git a/ui/src/main.tsx b/ui/src/main.tsx index 08b74d3..260cc68 100644 --- a/ui/src/main.tsx +++ b/ui/src/main.tsx @@ -20,7 +20,13 @@ function checkIfLoggedIn() { const session = cookies.get(`urbauth-~${window.ship}`); if (!session) { - authRedirect(); + fetch('/~/name') + .then((res) => res.text()) + .then((name) => { + if (name !== window.ship) { + authRedirect(); + } + }); } }