diff --git a/adapters/oidc/installed/src/main/java/org/keycloak/adapters/installed/KeycloakInstalled.java b/adapters/oidc/installed/src/main/java/org/keycloak/adapters/installed/KeycloakInstalled.java index e6e3f4ec72..2d61d7c0bf 100644 --- a/adapters/oidc/installed/src/main/java/org/keycloak/adapters/installed/KeycloakInstalled.java +++ b/adapters/oidc/installed/src/main/java/org/keycloak/adapters/installed/KeycloakInstalled.java @@ -165,7 +165,7 @@ public class KeycloakInstalled { String redirectUri = "http://localhost:" + callback.server.getLocalPort(); String state = UUID.randomUUID().toString(); - Pkce pkce = generatePkce(); + Pkce pkce = deployment.isPkce() ? generatePkce() : null; String authUrl = createAuthUrl(redirectUri, state, pkce);