From eaaeb4e6a45e70142a6e9d63738326d7630a5867 Mon Sep 17 00:00:00 2001 From: jelveh Date: Mon, 23 Feb 2026 18:19:35 -0800 Subject: [PATCH] Await update_auth_data before continuing Await the window.update_auth_data call in initgui.js so subsequent logic (such as popup spinner hiding and timing) runs after authentication data has been updated. This prevents race conditions where later UI code executes before auth state is fully applied. --- src/gui/src/initgui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/src/initgui.js b/src/gui/src/initgui.js index fe9a5865c..733b93095 100644 --- a/src/gui/src/initgui.js +++ b/src/gui/src/initgui.js @@ -1146,7 +1146,7 @@ window.initgui = async function (options) { resolve(); }); - window.update_auth_data(data.token, data.user); + await window.update_auth_data(data.token, data.user); // if this is a popup, hide the spinner, make sure it was visible for at least 2 seconds if(window.embedded_in_popup) await new Promise(async resolve => {