diff --git a/src/packages/authentication-keycloak/KeycloakAuthPlugin.ts b/src/packages/authentication-keycloak/KeycloakAuthPlugin.ts index f606019b..1938ba93 100644 --- a/src/packages/authentication-keycloak/KeycloakAuthPlugin.ts +++ b/src/packages/authentication-keycloak/KeycloakAuthPlugin.ts @@ -182,8 +182,7 @@ const DEFAULT_AUTO_REFRESH_OPT = { const DEFAULT_INIT_OPT = { onLoad: "check-sso", - pkceMethod: "S256", - scope: "data:read" + pkceMethod: "S256" }; export function getKeycloakConfig(properties: Partial): KeycloakOptions { diff --git a/src/packages/authentication-keycloak/README.md b/src/packages/authentication-keycloak/README.md index 777b26e6..baf34124 100644 --- a/src/packages/authentication-keycloak/README.md +++ b/src/packages/authentication-keycloak/README.md @@ -46,11 +46,11 @@ export function AppUI() { To configure the `authentication-keycloak` package, adjust these properties. For more details on the configuration properties, please visit the official documentation [API Reference](https://www.keycloak.org/docs/latest/securing_apps/index.html#api-reference). -| Property | Type | Description | Default | -| ------------------- | :-----------------: | --------------------------------------------------------------------------------------------------------------------: | --------------------------------------------------------------: | -| refreshOptions | RefreshOptions | Configure token refresh behavior and manage access token lifecycle in client applications. | `{autoRefresh: true, interval: 6000, timeLeft: 70}` | -| keycloakInitOptions | KeycloakInitOptions | Configure Keycloak's behavior during client application initialization. | `{onLoad: "check-sso", pkceMethod: "S256", scope: "data:read"}` | -| keycloakConfig | KeycloakConfig | The configuration settings required to establish a connection between the client application and the Keycloak server. | | +| Property | Type | Description | Default | +| ------------------- | :-----------------: | --------------------------------------------------------------------------------------------------------------------: | --------------------------------------------------: | +| refreshOptions | RefreshOptions | Configure token refresh behavior and manage access token lifecycle in client applications. | `{autoRefresh: true, interval: 6000, timeLeft: 70}` | +| keycloakInitOptions | KeycloakInitOptions | Configure Keycloak's behavior during client application initialization. | `{onLoad: "check-sso", pkceMethod: "S256"}` | +| keycloakConfig | KeycloakConfig | The configuration settings required to establish a connection between the client application and the Keycloak server. | | ```ts interface RefreshOptions { @@ -95,7 +95,7 @@ const element = createCustomElement({ onLoad: "check-sso", pkceMethod: "S256" // additional configuration, for example: - // scope: "data:read" + // scope: "openid address phone" }, keycloakConfig: { url: "http://keycloak-server/base_path", diff --git a/src/packages/authentication-keycloak/getKeycloakConfig.test.ts b/src/packages/authentication-keycloak/getKeycloakConfig.test.ts index 1927605e..7ba35a22 100644 --- a/src/packages/authentication-keycloak/getKeycloakConfig.test.ts +++ b/src/packages/authentication-keycloak/getKeycloakConfig.test.ts @@ -13,8 +13,7 @@ it("expect to throw an error if the keycloakConfig not provided ", async () => { }, keycloakInitOptions: { onLoad: "check-sso", - pkceMethod: "S256", - scope: "data:read" + pkceMethod: "S256" }, keycloakConfig: {} } as KeycloakOptions; diff --git a/src/samples/keycloak-sample/app.ts b/src/samples/keycloak-sample/app.ts index daedd5c6..3496f6d1 100644 --- a/src/samples/keycloak-sample/app.ts +++ b/src/samples/keycloak-sample/app.ts @@ -20,7 +20,6 @@ const element = createCustomElement({ keycloakInitOptions: { onLoad: "check-sso", pkceMethod: "S256" - //scope: "data:read" }, keycloakConfig: { url: import.meta.env.VITE_KEYCLOAK_CONFIG_URL,