Skip to Content
Clerk logo

Clerk Docs

Ctrl + K
Go to clerk.com

LinkedIn OpenID Connect

You will learn how to:

    • Create a LinkedIn application
    • Enable LinkedIn as a social connection
    • Set the Authorized Redirect URI in your LinkedIn application
    • Set the Client ID and Client Secret in your Clerk Dashboard
    • Enable OpenID Connect in your LinkedIn application

Configure LinkedIn connection for your development instance

To make the development flow as smooth as possible, Clerk uses preconfigured shared OAuth credentials and redirect URIs for development instances - no other configuration is needed. Navigate to the Clerk Dashboard and go to User & Authentication -> Social Connections(opens in a new tab). From the list of OAuth vendors, scroll to find the LinkedIn option. Toggle it on and click Save.

Configure LinkedIn connection for your production instance

In production instances, you must provide custom credentials, which includes generating your own Client ID and Client Secret using your LinkedIn Developer account. Don't worry, this tutorial will walk you through that process in just a few steps.

Create a LinkedIn application

To create a new OAuth LinkedIn app, go to the LinkedIn Developer portal(opens in a new tab) and click on the Create app button.

The Linkedin Developer dashboard's homepage. An arrow is pointing to the 'Create app' button.

Once redirected to the application creation form, you need to set a name, associate a LinkedIn page with it, and upload a logo for your new application.

The 'Create new app' form in the Linkedin Developer portal.

Enable LinkedIn as a social connection

To enable LinkedIn as a social connection for your Clerk application, go to the Clerk Dashboard. Navigate to User & Authentication > Social Connections(opens in a new tab). From the list of OAuth vendors, toggle on the LinkedIn option.

The 'Social connections' page in the Clerk Dashboard. An arrow is pointing to the LinkedIn toggle.

In the modal that opened, copy Authorized redirect URI. Keep this modal and page open.

The LinkedIn settings modal in the Clerk Dashboard. An arrow is pointing to the 'Redirect URI' copy button.

Set the Authorized Redirect URI for your LinkedIn application

Navigate back to the LinkedIn Developer portal and go to the Auth tab.

Scroll to the OAuth 2.0 settings section. In the Authorized redirect URLs for your app input, paste the Authorized Redirect URI value you copied from the Clerk Dashboard in the last step.

The 'Auth' tab in the Linkedin Developer dashboard for a user's application. There are arrows pointing to where the redirect URI should be entered.

Set the Client ID and Client Secret in your Clerk Dashboard

In the LinkedIn Developer portal, navigate to the Application credentials section and copy the Client ID and Client Secret.

The 'Auth' tab in the Linkedin Developer dashboard for a user's application. There are arrows pointing to the 'Client ID' and 'Client Secret' values.

Go back to the Clerk Dashboard, where the modal should still be open, and paste these values into the respective fields.

If the modal or page is not still open, go to the Clerk Dashboard and navigate to User & Authentication > Social Connections(opens in a new tab). Click on the settings cog icon next to the LinkedIn option. You can now paste the Client ID and Client Secret into their respective fields.

The LinkedIn settings modal in the Clerk Dashboard. There is an arrow pointing to the 'Client ID' and 'Client Secret' inputs.

Enable OpenID Connect in your LinkedIn application

In the LinkedIn Developer portal for your application, go to the Products tab. Enable the Sign In with LinkedIn using OpenID Connect product for your OAuth application.

If you need to ensure the longevity of the user's access token without the need for re-authentication, make sure to obtain approval as a Marketing Developer Platform (MDP) partner(opens in a new tab). This is not required if you don't directly interact with the LinkedIn API using the access token.

The 'Products' tab in the Linkedin Developer dashboard for a user's application. There is a red arrow with the number 1 pointing to the 'Products' tab and a red arrow with the number 2 pointing to the 'Request access' button on the 'Sign In with LinkedIn using OpenID Connect' product.

Finished πŸŽ‰

Congratulations! Social connection with LinkedIn is now configured for your Clerk application.

Last updated on April 19, 2024

What did you think of this content?

Clerk Β© 2024