From 5fd390a8ce1cb773629ed6ff82a9650e2c02ddae Mon Sep 17 00:00:00 2001 From: Darcy Ye Date: Thu, 23 Nov 2023 10:51:25 +0800 Subject: [PATCH] fix(console): update SSO console display (#4944) --- .../pages/EnterpriseSso/Guide/BasicInfo/index.tsx | 13 ++++++++----- .../EnterpriseSso/Guide/SamlMetadataForm/index.tsx | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/console/src/pages/EnterpriseSso/Guide/BasicInfo/index.tsx b/packages/console/src/pages/EnterpriseSso/Guide/BasicInfo/index.tsx index 1df3eed5c..6a28d87c1 100644 --- a/packages/console/src/pages/EnterpriseSso/Guide/BasicInfo/index.tsx +++ b/packages/console/src/pages/EnterpriseSso/Guide/BasicInfo/index.tsx @@ -19,8 +19,10 @@ type Props = { * This only applies to SAML SSO connectors. */ const providerPropertiesGuard = z.object({ - assertionConsumerServiceUrl: z.string().min(1), - entityId: z.string().min(1), + serviceProvider: z.object({ + assertionConsumerServiceUrl: z.string().min(1), + entityId: z.string().min(1), + }), }); function BasicInfo({ ssoConnectorId, providerName, providerConfig }: Props) { @@ -55,8 +57,9 @@ function BasicInfo({ ssoConnectorId, providerName, providerConfig }: Props) { className={styles.copyToClipboard} variant="border" value={applyCustomDomain( - conditional(result.success && result.data.assertionConsumerServiceUrl) ?? - new URL(`/api/authn/saml/sso/${ssoConnectorId}`, tenantEndpoint).toString() + conditional( + result.success && result.data.serviceProvider.assertionConsumerServiceUrl + ) ?? new URL(`/api/authn/saml/sso/${ssoConnectorId}`, tenantEndpoint).toString() )} /> @@ -65,7 +68,7 @@ function BasicInfo({ ssoConnectorId, providerName, providerConfig }: Props) { className={styles.copyToClipboard} variant="border" value={applyCustomDomain( - conditional(result.success && result.data.entityId) ?? + conditional(result.success && result.data.serviceProvider.entityId) ?? new URL(`/api/sso-connector/${ssoConnectorId}`, tenantEndpoint).toString() )} /> diff --git a/packages/console/src/pages/EnterpriseSso/Guide/SamlMetadataForm/index.tsx b/packages/console/src/pages/EnterpriseSso/Guide/SamlMetadataForm/index.tsx index 5cb32f05a..4454e6071 100644 --- a/packages/console/src/pages/EnterpriseSso/Guide/SamlMetadataForm/index.tsx +++ b/packages/console/src/pages/EnterpriseSso/Guide/SamlMetadataForm/index.tsx @@ -210,7 +210,7 @@ function SamlMetadataForm({ config, isGuidePage, providerConfig }: SamlMetadataF return ( <> - {!identityProviderConfig && isConfigEmpty && ( + {isFieldCheckRequired && !identityProviderConfig && isConfigEmpty && ( {t( formFormat === FormFormat.Url