Skip to content

Commit 9101488

Browse files
authored
feat(backend,clerk-js,types): Support the new LinkedIn OAuth Provider (#1772)
LinkedIn has changed the OAuth flow by replacing it with OpenID Connect. We have already added support for this in the backend.
1 parent f20adc3 commit 9101488

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

.changeset/serious-zebras-sip.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@clerk/clerk-js': minor
3+
'@clerk/backend': minor
4+
'@clerk/types': minor
5+
---
6+
7+
Add support for LinkedIn OIDC

packages/backend/src/api/resources/Enums.ts

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export type OAuthProvider =
99
| 'twitter'
1010
| 'twitch'
1111
| 'linkedin'
12+
| 'linkedin_oidc'
1213
| 'dropbox'
1314
| 'bitbucket'
1415
| 'microsoft'

packages/clerk-js/src/ui/utils/test/fixtures.ts

+1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ const socials = Object.freeze(
116116
'oauth_twitter',
117117
'oauth_twitch',
118118
'oauth_linkedin',
119+
'oauth_linkedin_oidc',
119120
'oauth_dropbox',
120121
'oauth_atlassian',
121122
'oauth_bitbucket',

packages/types/src/oauth.ts

+8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export type DiscordOauthProvider = 'discord';
1919
export type TwitterOauthProvider = 'twitter';
2020
export type TwitchOauthProvider = 'twitch';
2121
export type LinkedinOauthProvider = 'linkedin';
22+
export type LinkedinOIDCOauthProvider = 'linkedin_oidc';
2223
export type DropboxOauthProvider = 'dropbox';
2324
export type AtlassianOauthProvider = 'atlassian';
2425
export type BitbucketOauthProvider = 'bitbucket';
@@ -45,6 +46,7 @@ export type OAuthProvider =
4546
| TwitterOauthProvider
4647
| TwitchOauthProvider
4748
| LinkedinOauthProvider
49+
| LinkedinOIDCOauthProvider
4850
| DropboxOauthProvider
4951
| AtlassianOauthProvider
5052
| BitbucketOauthProvider
@@ -109,6 +111,12 @@ export const OAUTH_PROVIDERS: OAuthProviderData[] = [
109111
name: 'LinkedIn',
110112
docsUrl: 'https://clerk.com/docs/authentication/social-connection-with-linkedin',
111113
},
114+
{
115+
provider: 'linkedin_oidc',
116+
strategy: 'oauth_linkedin_oidc',
117+
name: 'LinkedIn',
118+
docsUrl: 'https://clerk.com/docs/authentication/social-connections/linkedin-oidc',
119+
},
112120
{
113121
provider: 'github',
114122
strategy: 'oauth_github',

0 commit comments

Comments
 (0)