From 2a9a3d71b063882e1267c7208431a8aa016c90e3 Mon Sep 17 00:00:00 2001
From: Laura Beatris <48022589+LauraBeatris@users.noreply.github.com>
Date: Wed, 18 Dec 2024 18:06:31 -0300
Subject: [PATCH 1/2] fix: Always rely on `enterpriseConnection.logoUrl`
---
.../UserProfile/EnterpriseAccountsSection.tsx | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/packages/clerk-js/src/ui/components/UserProfile/EnterpriseAccountsSection.tsx b/packages/clerk-js/src/ui/components/UserProfile/EnterpriseAccountsSection.tsx
index 674e402d60..b697f3aef2 100644
--- a/packages/clerk-js/src/ui/components/UserProfile/EnterpriseAccountsSection.tsx
+++ b/packages/clerk-js/src/ui/components/UserProfile/EnterpriseAccountsSection.tsx
@@ -1,4 +1,3 @@
-import { iconImageUrl } from '@clerk/shared/constants';
import { useUser } from '@clerk/shared/react';
import type { EnterpriseAccountResource, OAuthProvider } from '@clerk/types';
@@ -83,7 +82,6 @@ const EnterpriseAccount = ({ account }: { account: EnterpriseAccountResource })
const EnterpriseAccountProviderIcon = ({ account }: { account: EnterpriseAccountResource }) => {
const { provider, enterpriseConnection } = account;
- const isCustomOAuthProvider = provider.startsWith('oauth_custom_');
const providerWithoutPrefix = provider.replace(/(oauth_|saml_)/, '').trim() as OAuthProvider;
const connectionName = enterpriseConnection?.name ?? providerWithoutPrefix;
@@ -94,15 +92,6 @@ const EnterpriseAccountProviderIcon = ({ account }: { account: EnterpriseAccount
elementId: descriptors.enterpriseButtonsProviderIcon.setId(account.provider),
};
- if (!isCustomOAuthProvider) {
- return (
-
- );
- }
-
return enterpriseConnection?.logoPublicUrl ? (
Date: Wed, 18 Dec 2024 18:12:46 -0300
Subject: [PATCH 2/2] Add changeset
---
.changeset/friendly-trains-love.md | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 .changeset/friendly-trains-love.md
diff --git a/.changeset/friendly-trains-love.md b/.changeset/friendly-trains-love.md
new file mode 100644
index 0000000000..cd11208d2c
--- /dev/null
+++ b/.changeset/friendly-trains-love.md
@@ -0,0 +1,5 @@
+---
+'@clerk/clerk-js': patch
+---
+
+Fix broken enterprise connection icon for custom SAML provider