Skip to content

Commit 99f7536

Browse files
authored
fix(clerk-js): Fix broken enterprise connection icon for custom SAML provider (#4809)
1 parent 05c5de9 commit 99f7536

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

.changeset/friendly-trains-love.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/clerk-js': patch
3+
---
4+
5+
Fix broken enterprise connection icon for custom SAML provider

packages/clerk-js/src/ui/components/UserProfile/EnterpriseAccountsSection.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { iconImageUrl } from '@clerk/shared/constants';
21
import { useUser } from '@clerk/shared/react';
32
import type { EnterpriseAccountResource, OAuthProvider } from '@clerk/types';
43

@@ -83,7 +82,6 @@ const EnterpriseAccount = ({ account }: { account: EnterpriseAccountResource })
8382
const EnterpriseAccountProviderIcon = ({ account }: { account: EnterpriseAccountResource }) => {
8483
const { provider, enterpriseConnection } = account;
8584

86-
const isCustomOAuthProvider = provider.startsWith('oauth_custom_');
8785
const providerWithoutPrefix = provider.replace(/(oauth_|saml_)/, '').trim() as OAuthProvider;
8886
const connectionName = enterpriseConnection?.name ?? providerWithoutPrefix;
8987

@@ -94,15 +92,6 @@ const EnterpriseAccountProviderIcon = ({ account }: { account: EnterpriseAccount
9492
elementId: descriptors.enterpriseButtonsProviderIcon.setId(account.provider),
9593
};
9694

97-
if (!isCustomOAuthProvider) {
98-
return (
99-
<Image
100-
{...commonImageProps}
101-
src={iconImageUrl(providerWithoutPrefix)}
102-
/>
103-
);
104-
}
105-
10695
return enterpriseConnection?.logoPublicUrl ? (
10796
<Image
10897
{...commonImageProps}

0 commit comments

Comments
 (0)