Social Auth LinkedIn

Component ID

2878257

Component name

Social Auth LinkedIn

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

445

Component created

Component changed

Component body

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

The library PHP-LinkedIn-SDK developed by ashwinks is used for querying the LinkedIn API. The module should be installed using Composer, in order to retrieve the PHP-LinkedIn-SDK library.

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, user is logged in. If not, a new user account is created.

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

The library PHP-LinkedIn-SDK developed by ashwinks is used for querying the LinkedIn API. The module should be installed using Composer, in order to retrieve the PHP-LinkedIn-SDK library. The module is also dependent of 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"

8.x-1.x

composer require "drupal/social_auth_linkedin:~1.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