Skip to main content
This guide walks you through configuring LinkedIn as a social login provider for your application.

Prerequisites

Configure LinkedIn OAuth

1

Create a LinkedIn app

  1. Go to LinkedIn Developers
  2. Click Create app
  3. Fill in the app details (name, associated LinkedIn Page, logo) and finish the creation flow
  4. Open the Products tab and add Sign In with LinkedIn using OpenID Connect
  5. Navigate to the Auth tab to find your Client ID and Client Secret — you will need them in the next step
Scopes (openid, profile, email) are granted by adding the Sign In with LinkedIn using OpenID Connect product — they cannot be added manually in the OAuth 2.0 scopes panel. Make sure you add the OpenID Connect product and not the legacy “Sign In with LinkedIn” product.
2

Set the authorized redirect URL

In your LinkedIn app’s Auth tab:
  1. Under OAuth 2.0 settings > Authorized redirect URLs for your app, add:
https://${YOUR_CUSTOM_DOMAIN}/v1/session/login/oauth/linkedin/callback
Replace ${YOUR_CUSTOM_DOMAIN} with your custom domain (e.g. session.yourapp.com).
  1. Click Update
The redirect URL must match exactly. Make sure there is no trailing slash and that you are using https.
3

Create the LinkedIn OAuth configuration

curl -X POST https://api.prelude.dev/v2/session/apps/${APP_ID}/config/login/oauth/linkedin \
  -H "Authorization: Bearer ${MANAGEMENT_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "your-linkedin-client-id",
    "client_secret": "your-linkedin-client-secret",
    "enabled": true,
    "options": {
      "use_email_as_identifier": true,
      "allow_email_account_merge": true
    }
  }'
FieldDescription
client_idYour LinkedIn OAuth client ID.
client_secretYour LinkedIn OAuth client secret.
enabledSet to true to enable LinkedIn login.
options.use_email_as_identifierWhen true, the user’s LinkedIn email is stored as an email identifier.
options.allow_email_account_mergeWhen true, if a user with the same email already exists, the LinkedIn account is linked to the existing user.
LinkedIn uses “Sign In with LinkedIn using OpenID Connect”, which requests the openid, profile, and email scopes by default. The email is returned as verified, so it can be used as an identifier and for account merging.

Update the configuration

To update an existing LinkedIn OAuth configuration:
curl -X PUT https://api.prelude.dev/v2/session/apps/${APP_ID}/config/login/oauth/linkedin \
  -H "Authorization: Bearer ${MANAGEMENT_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "your-new-linkedin-client-id",
    "client_secret": "your-new-linkedin-client-secret",
    "enabled": true,
    "options": {
      "use_email_as_identifier": true,
      "allow_email_account_merge": true
    }
  }'

Delete the configuration

To remove LinkedIn OAuth from your application:
curl -X DELETE https://api.prelude.dev/v2/session/apps/${APP_ID}/config/login/oauth/linkedin \
  -H "Authorization: Bearer ${MANAGEMENT_API_KEY}"

What’s next?

Now that LinkedIn OAuth is configured on your backend, integrate the frontend using the Web Integration guide.