fix: set setActivePortalMasterKey on login when storage event is triggered

This commit is contained in:
Derrick Hammer 2023-07-20 03:16:23 -04:00
parent 20641e35d3
commit b6a7b138eb
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 7 additions and 1 deletions

View File

@ -1,4 +1,9 @@
import { addContextToErr, bytesToHex, hexToBytes } from "@lumeweb/libweb"; import {
addContextToErr,
bytesToHex,
hexToBytes,
setActivePortalMasterKey,
} from "@lumeweb/libweb";
import { import {
getLoginComplete, getLoginComplete,
getLogoutComplete, getLogoutComplete,
@ -38,6 +43,7 @@ function handleStorage(event: StorageEvent) {
} }
log("user is now logged in, attempting to load kernel"); log("user is now logged in, attempting to load kernel");
setActivePortalMasterKey(userKey);
setLoginComplete(true); setLoginComplete(true);
loadKernel(); loadKernel();
sendAuthUpdate(); sendAuthUpdate();