@@ -69,221 +69,3 @@ export type OAuthProvider =
6969 | EnstallOauthProvider
7070 | HuggingfaceOAuthProvider
7171 | CustomOauthProvider ;
72-
73- /**
74- * @deprecated Use `import { OAUTH_PROVIDERS } from "@clerk/shared/oauth"` instead.
75- *
76- * @hidden
77- */
78- export const OAUTH_PROVIDERS : OAuthProviderData [ ] = [
79- {
80- provider : 'google' ,
81- strategy : 'oauth_google' ,
82- name : 'Google' ,
83- docsUrl : 'https://clerk.com/docs/authentication/social-connections/google' ,
84- } ,
85- {
86- provider : 'discord' ,
87- strategy : 'oauth_discord' ,
88- name : 'Discord' ,
89- docsUrl : 'https://clerk.com/docs/authentication/social-connections/discord' ,
90- } ,
91- {
92- provider : 'facebook' ,
93- strategy : 'oauth_facebook' ,
94- name : 'Facebook' ,
95- docsUrl : 'https://clerk.com/docs/authentication/social-connections/facebook' ,
96- } ,
97- {
98- provider : 'twitch' ,
99- strategy : 'oauth_twitch' ,
100- name : 'Twitch' ,
101- docsUrl : 'https://clerk.com/docs/authentication/social-connections/twitch' ,
102- } ,
103- {
104- provider : 'twitter' ,
105- strategy : 'oauth_twitter' ,
106- name : 'Twitter' ,
107- docsUrl : 'https://clerk.com/docs/authentication/social-connections/twitter' ,
108- } ,
109- {
110- provider : 'microsoft' ,
111- strategy : 'oauth_microsoft' ,
112- name : 'Microsoft' ,
113- docsUrl : 'https://clerk.com/docs/authentication/social-connections/microsoft' ,
114- } ,
115- {
116- provider : 'tiktok' ,
117- strategy : 'oauth_tiktok' ,
118- name : 'TikTok' ,
119- docsUrl : 'https://clerk.com/docs/authentication/social-connections/tiktok' ,
120- } ,
121- {
122- provider : 'linkedin' ,
123- strategy : 'oauth_linkedin' ,
124- name : 'LinkedIn' ,
125- docsUrl : 'https://clerk.com/docs/authentication/social-connections/linkedin' ,
126- } ,
127- {
128- provider : 'linkedin_oidc' ,
129- strategy : 'oauth_linkedin_oidc' ,
130- name : 'LinkedIn' ,
131- docsUrl : 'https://clerk.com/docs/authentication/social-connections/linkedin-oidc' ,
132- } ,
133- {
134- provider : 'github' ,
135- strategy : 'oauth_github' ,
136- name : 'GitHub' ,
137- docsUrl : 'https://clerk.com/docs/authentication/social-connections/github' ,
138- } ,
139- {
140- provider : 'gitlab' ,
141- strategy : 'oauth_gitlab' ,
142- name : 'GitLab' ,
143- docsUrl : 'https://clerk.com/docs/authentication/social-connections/gitlab' ,
144- } ,
145- {
146- provider : 'dropbox' ,
147- strategy : 'oauth_dropbox' ,
148- name : 'Dropbox' ,
149- docsUrl : 'https://clerk.com/docs/authentication/social-connections/dropbox' ,
150- } ,
151- {
152- provider : 'atlassian' ,
153- strategy : 'oauth_atlassian' ,
154- name : 'Atlassian' ,
155- docsUrl : 'https://clerk.com/docs/authentication/social-connections/atlassian' ,
156- } ,
157- {
158- provider : 'bitbucket' ,
159- strategy : 'oauth_bitbucket' ,
160- name : 'Bitbucket' ,
161- docsUrl : 'https://clerk.com/docs/authentication/social-connections/bitbucket' ,
162- } ,
163- {
164- provider : 'hubspot' ,
165- strategy : 'oauth_hubspot' ,
166- name : 'HubSpot' ,
167- docsUrl : 'https://clerk.com/docs/authentication/social-connections/hubspot' ,
168- } ,
169- {
170- provider : 'notion' ,
171- strategy : 'oauth_notion' ,
172- name : 'Notion' ,
173- docsUrl : 'https://clerk.com/docs/authentication/social-connections/notion' ,
174- } ,
175- {
176- provider : 'apple' ,
177- strategy : 'oauth_apple' ,
178- name : 'Apple' ,
179- docsUrl : 'https://clerk.com/docs/authentication/social-connections/apple' ,
180- } ,
181- {
182- provider : 'line' ,
183- strategy : 'oauth_line' ,
184- name : 'LINE' ,
185- docsUrl : 'https://clerk.com/docs/authentication/social-connections/line' ,
186- } ,
187- {
188- provider : 'instagram' ,
189- strategy : 'oauth_instagram' ,
190- name : 'Instagram' ,
191- docsUrl : 'https://clerk.com/docs/authentication/social-connections/instagram' ,
192- } ,
193- {
194- provider : 'coinbase' ,
195- strategy : 'oauth_coinbase' ,
196- name : 'Coinbase' ,
197- docsUrl : 'https://clerk.com/docs/authentication/social-connections/coinbase' ,
198- } ,
199- {
200- provider : 'spotify' ,
201- strategy : 'oauth_spotify' ,
202- name : 'Spotify' ,
203- docsUrl : 'https://clerk.com/docs/authentication/social-connections/spotify' ,
204- } ,
205- {
206- provider : 'xero' ,
207- strategy : 'oauth_xero' ,
208- name : 'Xero' ,
209- docsUrl : 'https://clerk.com/docs/authentication/social-connections/xero' ,
210- } ,
211- {
212- provider : 'box' ,
213- strategy : 'oauth_box' ,
214- name : 'Box' ,
215- docsUrl : 'https://clerk.com/docs/authentication/social-connections/box' ,
216- } ,
217- {
218- provider : 'slack' ,
219- strategy : 'oauth_slack' ,
220- name : 'Slack' ,
221- docsUrl : 'https://clerk.com/docs/authentication/social-connections/slack' ,
222- } ,
223- {
224- provider : 'linear' ,
225- strategy : 'oauth_linear' ,
226- name : 'Linear' ,
227- docsUrl : 'https://clerk.com/docs/authentication/social-connections/linear' ,
228- } ,
229- {
230- provider : 'x' ,
231- strategy : 'oauth_x' ,
232- name : 'X / Twitter' ,
233- docsUrl : 'https://clerk.com/docs/authentication/social-connections/x-twitter-v2' ,
234- } ,
235- {
236- provider : 'enstall' ,
237- strategy : 'oauth_enstall' ,
238- name : 'Enstall' ,
239- docsUrl : 'https://clerk.com/docs/authentication/social-connections/enstall' ,
240- } ,
241- {
242- provider : 'huggingface' ,
243- strategy : 'oauth_huggingface' ,
244- name : 'Hugging Face' ,
245- docsUrl : 'https://clerk.com/docs/authentication/social-connections/huggingface' ,
246- } ,
247- ] ;
248-
249- interface getOAuthProviderDataProps {
250- provider ?: OAuthProvider ;
251- strategy ?: OAuthStrategy ;
252- }
253-
254- /**
255- * @deprecated This utility will be dropped in the next major release.
256- *
257- * @hidden
258- */
259- export function getOAuthProviderData ( {
260- provider,
261- strategy,
262- } : getOAuthProviderDataProps ) : OAuthProviderData | undefined | null {
263- if ( provider ) {
264- return OAUTH_PROVIDERS . find ( oauth_provider => oauth_provider . provider == provider ) ;
265- }
266-
267- return OAUTH_PROVIDERS . find ( oauth_provider => oauth_provider . strategy == strategy ) ;
268- }
269-
270- /**
271- * @deprecated This utility will be dropped in the next major release.
272- *
273- * @hidden
274- */
275- export function sortedOAuthProviders ( sortingArray : OAuthStrategy [ ] ) {
276- return OAUTH_PROVIDERS . slice ( ) . sort ( ( a , b ) => {
277- let aPos = sortingArray . indexOf ( a . strategy ) ;
278- if ( aPos == - 1 ) {
279- aPos = Number . MAX_SAFE_INTEGER ;
280- }
281-
282- let bPos = sortingArray . indexOf ( b . strategy ) ;
283- if ( bPos == - 1 ) {
284- bPos = Number . MAX_SAFE_INTEGER ;
285- }
286-
287- return aPos - bPos ;
288- } ) ;
289- }
0 commit comments