From abef9ffabf5b1fa91948d631e6e63c0063c47918 Mon Sep 17 00:00:00 2001 From: Huarch Date: Wed, 19 Aug 2026 18:12:21 +0800 Subject: [PATCH] fix: bypass blocked Keycloak session iframe --- src/shared/auth/keycloak-auth.test.ts | 3 ++- src/shared/auth/keycloak-auth.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/shared/auth/keycloak-auth.test.ts b/src/shared/auth/keycloak-auth.test.ts index 68e686c..ccf5966 100644 --- a/src/shared/auth/keycloak-auth.test.ts +++ b/src/shared/auth/keycloak-auth.test.ts @@ -40,7 +40,8 @@ describe("Keycloak authentication", () => { expect(client.init).toHaveBeenCalledWith({ onLoad: "login-required", flow: "standard", - pkceMethod: "S256" + pkceMethod: "S256", + checkLoginIframe: false }); expect(authentication.user).toEqual({ name: "张调度", diff --git a/src/shared/auth/keycloak-auth.ts b/src/shared/auth/keycloak-auth.ts index 2b7e70e..017e792 100644 --- a/src/shared/auth/keycloak-auth.ts +++ b/src/shared/auth/keycloak-auth.ts @@ -59,7 +59,8 @@ export async function initializeAuthentication( const authenticated = await keycloak.init({ onLoad: "login-required", flow: "standard", - pkceMethod: "S256" + pkceMethod: "S256", + checkLoginIframe: false }); if (!authenticated) {