mirror of
https://github.com/tloncorp/landscape.git
synced 2024-12-01 02:45:49 +03:00
auth: switch to new compatibility method
This commit is contained in:
parent
9e3d85534c
commit
b2ad1df745
@ -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();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user