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); + }); }); };