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.
- Navigate to https://www.linkedin.com/developer/apps
- Log in with your LinkedIn credentials if you are not logged in
- Locate the yellow “Create application” button and click on it.
- Fill the fields marked with *
- Fill “Website URL” with the URL of your homepage. E.g.: http://yoursite.com
- Find the necessary Authentication Keys under the Authentication menu
- Add the following URL to the “Authorized Redirect URLs:” field: http://yoursite.com/wp-login.php?loginSocial=linkedin where yoursite.com is your site’s URL
- You probably want to enable the “r_emailaddress” under the Default Application Permissions
- Hit update to save the changes
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.
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.
The Client ID of your Linkedin app. You can find it at your App under Authentication Keys.
The Client Secret of your Linkedin app. You can find it at your App under Authentication Keys.
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.
By default Nextend Social Login stores the first name, last name, email, avatar url and access token if it is possible, however some additional information can also be retrieved and stored.
When an option is checked, that field will be stored in a meta key with the specified name.
It determines when the synchronization shall happen.
- Register: whenever a new user registers with a provider, their data will be retrieved and stored.
- Login: whenever user logs in with a provider, their data will be retrieved and stored.
- Link: whenever user links and existing WordPress account with a provider, their data will be retrieved and stored.
Stores the user’s headline.
Public profile url
Stores a the URL to the user’s public profile on LinkedIn.
Stores the location name and the county code of the user’s physical location.
Stores the industry where the user belongs to.
Stores the description of the user’s professional profile.
Stores the title of the position, the summary of the position and the name of the company for each positions.
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.