diff --git a/frontend/src/lib/auth.ts b/frontend/src/lib/auth.ts index 90bdaa934..039a96822 100644 --- a/frontend/src/lib/auth.ts +++ b/frontend/src/lib/auth.ts @@ -21,6 +21,10 @@ function createAuthentication() { async function configure(config: AuthenticationConfig): Promise { keycloak = new Keycloak(config) + console.log("[auth debug] created Keycloak with config") + console.log(config) + console.log("[auth debug] location: ", window.location.href) + try { await keycloak.init({ onLoad: "login-required", @@ -28,6 +32,8 @@ function createAuthentication() { pkceMethod: "S256", scope: "profile email", }) + + console.log("[auth debug] initialized Keycloak", keycloak) } catch (e) { keycloak = undefined throw new Error("Failed to initialize authentication", { cause: e }) diff --git a/frontend/src/main.ts b/frontend/src/main.ts index f57a2e077..27be62469 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -28,6 +28,9 @@ try { .use(router) .use(Sentry, { environment: env.name, router }) + console.log("[auth debug] location when creating app: ", window.location.href) + console.log("[auth debug] created app") + // Configure authentication const auth = useAuthentication() await auth.configure({ @@ -36,8 +39,11 @@ try { realm: env.authRealm, }) + console.log("[auth debug] configured authentication") + // If all initialization succeeds, mount app app.mount("#app") + console.log("[auth debug] mounted app") } catch (e: unknown) { // If an error occurs above, catch it here