Provider – LinkedIn

LinkedIn Sample

Table of contents

How to enable LinkedIn login in WordPress

1. App creation

To be able to log in via Linkedin you must create a Linkedin app first.

  1. Navigate to
  2. Log in with your LinkedIn credentials if you are not logged in
  3. Locate the yellow “Create application” button and click on it.
  4. Enter the name of your App to the “App name” field.
  5. Find your company page in the “Company” field. If you don’t have one yet, create new one at:
  6. Enter your “Privacy policy URL” and upload an “App logo”
  7. Read and agree the “API Terms of Use” then click the “Create App” button!
  8. You will end up in the App setting area. Click on the “Products” tab.
  9. Find “Sign In with LinkedIn” and click “Select”.
  10. A modal will appear where you need to tick the “I have read and agree to these terms” checkbox and finally press the “Add product” button.
  11. Click on the “Auth” tab.
  12. Find “OAuth 2.0 settings” section and add the following URL to the “Redirect URLs” field: where is your own domain
  13. Click on “Update” to save the changes
  14. Find the necessary “Client ID” and “Client Secret” under the Application credentials section, on the Auth tab.

2. App setup

Once your Linkedin app is ready you’ll need to copy and paste the Client ID and Client Secret to the Linkedin provider’s Settings tab. You can find the information at your Linkedin app’s Settings which you can reach from the left sidebar.

3. Verification

Once your Client ID and Client Secret has been added you need to verify the setup first. This verification helps you identify possible problems with the app.


Linkedin Provider Configuration

Client ID

The Client ID of your Linkedin app. You can find it at your App under Authentication Keys.

Client Secret

The Client Secret of your Linkedin app. You can find it at your App under Authentication Keys.

Linkedin Provider Configuration

Username prefix on Register

Whenever a new user registers with their LinkedIn account they can get a custom prefix so you can easily identify them.

Fallback username prefix on register

Whenever a new user registers with their LinkedIn account and we can not generate a valid username from the first name or last name, a random username will be generated. With this option they can get a custom prefix so you can easily identify them.

Terms and conditions

This option can only be seen, if Terms and conditions is set to Show in Global Settings → Privacy tab. Here you can set custom Terms and Conditions for users who register with LinkedIn. For more information please read our GDPR documentation.

Sync data

LinkedIn stated all developers need to migrate to Version 2.0 of their REST API by May 1. Unfortunately the new Apps no longer provide access for the r_basicprofile permission, which means the fields we can access to are limited:

  • First name
  • Last name
  • User ID
  • Avatar

With additional scopes the Email Address of the user can also be retrieved.
Since the sync data fields we had in Nextend Social Login v3.0.18 and before are no longer available in the v2/me REST API Endpoint, we need to remove the whole sync data feature of the LinkedIn provider.

Common error messages returned by LinkedIn during verification

redirect_uri does not match

The redirect_uri does not match the registered value

The problem is that the entered Authorized redirect URLs field is not correct for your app. Check the 8th step of the App setup to fix the problem.

client_id is invalid

The passed in client_id is invalid

The entered Client ID is not correct. Maybe the app with the entered ID was deleted. Go to the LinkedIn provider → Settings and make sure that an existing App’s Client ID and Client Secret was entered.

Client authentication failed

Error: invalid_client: Client authentication failed

The Client Secret you copied from the LinkedIn app is invalid. Make sure the correct one was copied.