diff --git a/firebase-vscode/CHANGELOG.md b/firebase-vscode/CHANGELOG.md index 83005779a9f..ea332b1e4b2 100644 --- a/firebase-vscode/CHANGELOG.md +++ b/firebase-vscode/CHANGELOG.md @@ -1,5 +1,7 @@ ## NEXT +- [Fixed] User auth will now load without requiring extension sidebar to open + ## 1.0.0 - [Breaking] Updated minimum VSCode version requirement to 1.69.0 to ensure node 20 is used diff --git a/firebase-vscode/src/core/user.ts b/firebase-vscode/src/core/user.ts index 8485cead304..f2e17263d28 100644 --- a/firebase-vscode/src/core/user.ts +++ b/firebase-vscode/src/core/user.ts @@ -43,14 +43,20 @@ export function registerUser( }, ); + const getInitialData = async () => { + isLoadingUser.value = true; + currentUser.value = await checkLogin(); + isLoadingUser.value = false; + }; + + getInitialData(); + const notifyUserChangedSub = effect(() => { broker.send("notifyUserChanged", { user: currentUser.value }); }); const getInitialDataSub = broker.on("getInitialData", async () => { - isLoadingUser.value = true; - currentUser.value = await checkLogin(); - isLoadingUser.value = false; + await getInitialData(); }); const isLoadingSub = effect(() => {