This project is based on the Social API and heavily inspired by the Social Auth Google and Social Auth Facebook modules

Social Auth LinkedIn allows users to register and login to your Drupal site with their LinkedIn account. It is based on Social Auth and Social API projects.

This module adds the path user/login/linkedin which redirects the user to LinkedIn for authentication.

After LinkedIn has returned the user to your site, the module compares the email address provided by LinkedIn. If your site already has an account with the same email address or the user has previously registered using LinkedIn, user is logged in. If not, a new user account is created. Also, a LinkedIn account can be associated to an authenticated user.

Login process can be initiated from the "LinkedIn" button in the Social Auth block. Alternatively, site builders can place (and theme) a link to user/login/linkedin wherever on the site.

Instructions

In 2.x, PHP League OAuth2 for LinkedIn is used for querying the LinkedIn API.

The module should be installed using Composer, in order to retrieve the required library. The module is also dependent on the Social API and Social Auth modules.

Create LinkedIn Application

Go to https://www.linkedin.com/developer/apps and create a new application. After creating it, make sure both r_basicprofile and r_emailaddress permissions are checked.

The Client ID and Client Secret values will be required when configuring the module

Your Oauth 2.0 authorized redirect url will be
[your_base_url]/user/login/linkedin/callback

Install Social Auth LinkedIn

Install module using composer to take care of dependencies

8.x-2.x

composer require "drupal/social_auth_linkedin:^2.0"

Activate the Social Auth LinkedIn module and configure the Client ID and Client Secret acquired using the values acquired from LinkedIn.

The LinkedIn Auth button should now be appearing in the Social Auth Block

Supporting organizations: 

Project information

Downloads