From 2a3869b06de50f592ce819277ee1410dd2038650 Mon Sep 17 00:00:00 2001 From: djuarezgf Date: Fri, 18 Oct 2024 19:26:16 +0200 Subject: [PATCH] Test --- src/main.ts | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/main.ts b/src/main.ts index 5aee6e0..76904a6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -26,19 +26,18 @@ const vueLifecycles = singleSpaVue({ app.use(router); app.use(store); -// Load config before bootstrapping the application -export const bootstrap = async () => { +export const bootstrap = () => { return new Promise((resolve) => { // Load the configuration first - await getConfig(); - - const onAuthenticatedCallback = () => { - console.log('Authenticated!'); - resolve(vueLifecycles.bootstrap); - }; - - // Continue with Keycloak authentication after config is loaded - KeyCloakService.CallLogin(onAuthenticatedCallback); + getConfig().then(() => { + const onAuthenticatedCallback = () => { + console.log('Authenticated!'); + resolve(vueLifecycles.bootstrap); + }; + + // Continue with Keycloak authentication after config is loaded + KeyCloakService.CallLogin(onAuthenticatedCallback); + }); }); };