0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-27 21:39:16 -05:00

fix(console): update SSO console display (#4944)

This commit is contained in:
Darcy Ye 2023-11-23 10:51:25 +08:00 committed by GitHub
parent 4e4c8b18a9
commit 5fd390a8ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View file

@ -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()
)}
/>
</FormField>
@ -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()
)}
/>

View file

@ -210,7 +210,7 @@ function SamlMetadataForm({ config, isGuidePage, providerConfig }: SamlMetadataF
return (
<>
{!identityProviderConfig && isConfigEmpty && (
{isFieldCheckRequired && !identityProviderConfig && isConfigEmpty && (
<InlineNotification severity="alert">
{t(
formFormat === FormFormat.Url