WorkOS Docs Homepage
Integrations

LinkedIn OAuth

Learn how to set up OAuth with LinkedIn

The LinkedIn OAuth integration allows your users to authenticate using their LinkedIn credentials.

The configuration process involves creating an OAuth application in LinkedIn and configuring the client credentials in your WorkOS Dashboard.

When setting up LinkedIn OAuth, WorkOS provides one key piece of information that needs to be configured in your LinkedIn OAuth application:

  • Redirect URI: The endpoint where LinkedIn will send authentication responses after successful login

The Redirect URI is available in the WorkOS Dashboard. In the left navigation menu, select the Authentication tab and the OAuth providers sub-tab. Locate the LinkedIn section.

The LinkedIn OAuth section in the WorkOS Dashboard.

Click Enable. The LinkedIn OAuth configuration dialog will open. Locate the Redirect URI.

The LinkedIn OAuth configuration modal in the WorkOS Dashboard.

The Redirect URI serves as the destination for authentication responses and must be configured in your LinkedIn OAuth application as an authorized redirect URL.

You will need to obtain two pieces of information from a LinkedIn Developer application:

  • LinkedIn Client ID: Application identifier from LinkedIn
  • LinkedIn Client Secret: Authentication secret for the application (called Primary Client Secret in LinkedIn)

The following sections will guide you through creating an OAuth application in your LinkedIn Developer account and generating these credentials.

Log in to your LinkedIn account and navigate to the LinkedIn Developer Portal. Click Create app.

The LinkedIn page to register a new OAuth application.

Fill out the form with the required details about your application, including the application name, LinkedIn page, and app logo.

The LinkedIn form to create a new OAuth application.

Click Create app to create the application.

On the application page, click the Auth tab. Copy the Client ID and Primary Client Secret as you’ll need them for the WorkOS configuration.

OAuth client credentials in the LinkedIn developer settings.

Click the pencil button next to OAuth 2.0 settings > Authorized redirect URLs for your app. Click Add redirect URL and paste the Redirect URI from the WorkOS Dashboard. Click Update.

OAuth redirect URL in the LinkedIn developer settings.

Click the Products tab and add the Sign In with LinkedIn using OpenID Connect product to enable OIDC authentication capabilities.

The LinkedIn OIDC configuration dashboard.

Now that you have the LinkedIn Client ID and LinkedIn Client Secret (Primary Client Secret) from the previous steps, return to the WorkOS Dashboard.

In the LinkedIn OAuth configuration dialog, enable the integration. Paste the credentials from LinkedIn into their respective fields in the WorkOS Dashboard.

The LinkedIn OAuth configuration modal in the WorkOS Dashboard.

Click Save to complete the configuration.

You are now ready to start authenticating with LinkedIn OAuth. You will use the provider query parameter in the Get Authorization URL API endpoint to support global LinkedIn OAuth for any domain. The provider query parameter should be set to LinkedInOAuth.

How is the WorkOS LinkedIn OAuth integration different from implementing regular LinkedIn OAuth flow?

It’s the same LinkedIn OAuth flow as you could build yourself, but it’s encapsulated within WorkOS SSO. This means you don’t need to build it yourself. In addition to LinkedIn OAuth, you can use WorkOS SSO to support other identity providers, all with a single integration.

What is the provider query parameter and how is it used in the LinkedIn OAuth integration?

You can use the provider query parameter in the Get Authorization URL API endpoint to support global LinkedIn OAuth for any domain. The provider query parameter should be set to LinkedInOAuth.

Do I need a LinkedIn Company Page to create an OAuth application?

Yes, LinkedIn requires that OAuth applications be associated with a LinkedIn Company Page. This is a requirement from LinkedIn to ensure applications are associated with legitimate businesses or organizations.

What is the difference between Client ID and Primary Client Secret in LinkedIn?

The Client ID is the public identifier for your LinkedIn application, while the Primary Client Secret is the private authentication key that must be kept secure. The Primary Client Secret is what WorkOS refers to as the LinkedIn Client Secret.

Why do I need to add the “Sign In with LinkedIn using OpenID Connect” product?

This product enables OIDC (OpenID Connect) authentication capabilities for your LinkedIn application, which is required for the WorkOS integration to function properly. Without this product, the OAuth flow will not work correctly.