From 8be1a7abc8849d7d59552011bd6b25bc917d51f5 Mon Sep 17 00:00:00 2001 From: Nikos Polykandriotis Date: Tue, 27 Aug 2024 13:54:25 +0300 Subject: [PATCH] feat(types): Add Hugging Face OAuth Provider constants (#4021) --- .changeset/selfish-dogs-taste.md | 6 ++++++ .../__tests__/useEnabledThirdPartyProviders.test.tsx | 1 + packages/types/src/oauth.ts | 8 ++++++++ 3 files changed, 15 insertions(+) create mode 100644 .changeset/selfish-dogs-taste.md diff --git a/.changeset/selfish-dogs-taste.md b/.changeset/selfish-dogs-taste.md new file mode 100644 index 0000000000..d6d43cb5dc --- /dev/null +++ b/.changeset/selfish-dogs-taste.md @@ -0,0 +1,6 @@ +--- +"@clerk/clerk-js": patch +"@clerk/types": patch +--- + +Introduce support for the Hugging Face OAuth Provider. diff --git a/packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx b/packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx index 6675ba6ff8..6b402a3ee5 100644 --- a/packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx +++ b/packages/clerk-js/src/ui/hooks/__tests__/useEnabledThirdPartyProviders.test.tsx @@ -41,6 +41,7 @@ describe('useEnabledThirdPartyProviders', () => { 'oauth_gitlab', 'oauth_google', 'oauth_hubspot', + 'oauth_huggingface', 'oauth_instagram', 'oauth_line', 'oauth_linear', diff --git a/packages/types/src/oauth.ts b/packages/types/src/oauth.ts index 397ebdcc9f..cb12c94157 100644 --- a/packages/types/src/oauth.ts +++ b/packages/types/src/oauth.ts @@ -36,6 +36,7 @@ export type SlackOauthProvider = 'slack'; export type LinearOauthProvider = 'linear'; export type XOauthProvider = 'x'; export type EnstallOauthProvider = 'enstall'; +export type HuggingfaceOAuthProvider = 'huggingface'; export type CustomOauthProvider = `custom_${string}`; export type OAuthProvider = @@ -66,6 +67,7 @@ export type OAuthProvider = | LinearOauthProvider | XOauthProvider | EnstallOauthProvider + | HuggingfaceOAuthProvider | CustomOauthProvider; export const OAUTH_PROVIDERS: OAuthProviderData[] = [ @@ -231,6 +233,12 @@ export const OAUTH_PROVIDERS: OAuthProviderData[] = [ name: 'Enstall', docsUrl: 'https://clerk.com/docs/authentication/social-connections/enstall', }, + { + provider: 'huggingface', + strategy: 'oauth_huggingface', + name: 'Hugging Face', + docsUrl: 'https://clerk.com/docs/authentication/social-connections/huggingface', + }, ]; interface getOAuthProviderDataProps {