refactor: add getLoggedInDefer calls to kernelAuthStatus check
This commit is contained in:
parent
2fd4a3be71
commit
56e0181c37
|
@ -6,11 +6,13 @@ import {
|
||||||
getAuthStatusDefer,
|
getAuthStatusDefer,
|
||||||
getAuthStatusKnown,
|
getAuthStatusKnown,
|
||||||
getKernelIframe,
|
getKernelIframe,
|
||||||
|
getLoggedInDefer,
|
||||||
getOpenPorts,
|
getOpenPorts,
|
||||||
getQueries,
|
getQueries,
|
||||||
getQueriesNonce,
|
getQueriesNonce,
|
||||||
getQuery,
|
getQuery,
|
||||||
increaseQueriesNonce,
|
increaseQueriesNonce,
|
||||||
|
resetLoggedInDefer,
|
||||||
setAuthStatus,
|
setAuthStatus,
|
||||||
setAuthStatusKnown,
|
setAuthStatusKnown,
|
||||||
} from "../../vars.js";
|
} from "../../vars.js";
|
||||||
|
@ -49,6 +51,11 @@ export function handleKernelMessage(event: MessageEvent) {
|
||||||
console.log("bootloader is now initialized");
|
console.log("bootloader is now initialized");
|
||||||
if (!getAuthStatus().loginComplete) {
|
if (!getAuthStatus().loginComplete) {
|
||||||
console.log("user is not logged in: waiting until login is confirmed");
|
console.log("user is not logged in: waiting until login is confirmed");
|
||||||
|
} else {
|
||||||
|
getLoggedInDefer().resolve();
|
||||||
|
}
|
||||||
|
if (getAuthStatus().logoutComplete) {
|
||||||
|
resetLoggedInDefer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue