auth: switch to new compatibility method

This commit is contained in:
Hunter Miller 2023-02-13 11:06:52 -06:00
parent 9e3d85534c
commit b2ad1df745

View File

@ -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();
}
});
}
}