Prerequisites
- A LinkedIn Developer account
- Your LinkedIn OAuth Client ID and Client Secret
Configure LinkedIn OAuth
Create a LinkedIn app
- Go to LinkedIn Developers
- Click Create app
- Fill in the app details (name, associated LinkedIn Page, logo) and finish the creation flow
- Open the Products tab and add Sign In with LinkedIn using OpenID Connect
- 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.Set the authorized redirect URL
In your LinkedIn app’s Auth tab:Replace
- Under OAuth 2.0 settings > Authorized redirect URLs for your app, add:
${YOUR_CUSTOM_DOMAIN} with your custom domain (e.g. session.yourapp.com).- Click Update
The redirect URL must match exactly. Make sure there is no trailing slash and that you are using
https.Create the LinkedIn OAuth configuration
| Field | Description |
|---|---|
client_id | Your LinkedIn OAuth client ID. |
client_secret | Your LinkedIn OAuth client secret. |
enabled | Set to true to enable LinkedIn login. |
options.use_email_as_identifier | When true, the user’s LinkedIn email is stored as an email identifier. |
options.allow_email_account_merge | When 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.