diff --git a/js/apps/admin-ui/src/clients/credentials/Credentials.tsx b/js/apps/admin-ui/src/clients/credentials/Credentials.tsx
index 34f5b8c9cb70..895f132727be 100644
--- a/js/apps/admin-ui/src/clients/credentials/Credentials.tsx
+++ b/js/apps/admin-ui/src/clients/credentials/Credentials.tsx
@@ -67,6 +67,10 @@ export const Credentials = ({ client, save, refresh }: CredentialsProps) => {
const [accessToken, setAccessToken] = useState("");
const [open, isOpen] = useState(false);
+ const selectedProvider = providers.find(
+ (provider) => provider.id === clientAuthenticatorType,
+ );
+
useFetch(
() =>
Promise.all([
@@ -200,17 +204,17 @@ export const Credentials = ({ client, save, refresh }: CredentialsProps) => {
- {(clientAuthenticatorType === "client-secret" ||
- clientAuthenticatorType === "client-secret-jwt") && }
- {(clientAuthenticatorType === "client-secret" ||
- clientAuthenticatorType === "client-secret-jwt") && (
-
-
-
+ {selectedProvider?.supportsSecret && (
+ <>
+
+
+
+
+ >
)}
diff --git a/js/libs/keycloak-admin-client/src/defs/authenticatorConfigRepresentation.ts b/js/libs/keycloak-admin-client/src/defs/authenticatorConfigRepresentation.ts
index 00830a86a407..a46ca76246aa 100644
--- a/js/libs/keycloak-admin-client/src/defs/authenticatorConfigRepresentation.ts
+++ b/js/libs/keycloak-admin-client/src/defs/authenticatorConfigRepresentation.ts
@@ -13,4 +13,5 @@ export interface AuthenticationProviderRepresentation {
id?: string;
displayName?: string;
description?: string;
+ supportsSecret?: boolean;
}
diff --git a/services/src/main/java/org/keycloak/services/resources/admin/AuthenticationManagementResource.java b/services/src/main/java/org/keycloak/services/resources/admin/AuthenticationManagementResource.java
index 4fadf645711c..5438a0184504 100755
--- a/services/src/main/java/org/keycloak/services/resources/admin/AuthenticationManagementResource.java
+++ b/services/src/main/java/org/keycloak/services/resources/admin/AuthenticationManagementResource.java
@@ -158,17 +158,27 @@ public Stream