This documentation site is about the unstable (upcoming) Comentario version.  Switch to the stable version »

Login via LinkedIn

How to configure OAuth2 login via LinkedIn

To let your users sign in with their LinkedIn account, you’ll have to configure an OIDC identity provider by following the below steps.

https:://www.linkedin.com/company/comentario-app/

  1. Register as a LinkedIn developer.
  2. Navigate to My Apps ⇒ Create app.
  3. Configure the application, by providing an app name, a LinkedIn page URL, Privacy policy URL, and a logo:
    Image
  4. On the Products tab, in the Sign In with LinkedIn using OpenID Connect block, click Request access:
    Image
  5. Agree to the Terms, and you’ll see the Sign In under Added products.
  6. Go to the Auth tab:
    1. Note the Client ID and the Primary Client Secret and store them in a safe place for future reference.
    2. Under OAuth 2.0 settings, click on the pencil icon.
    3. Add the following redirect URL: https://<your-comentario-domain>/api/oauth/oidc:linkedin/callback:
      Image
  7. Update the secrets configuration with the above data:
...
idp:
 oidc:
  - id:     linkedin
    name:   LinkedIn
    url:    https://www.linkedin.com/oauth/
    scopes:
     - openid
     - profile
     - email
    key:    78d26udw82x728
    secret: OfveFNVVm2l3Dkkd
...
  1. Restart Comentario. You should now see LinkedIn under Configured federated identity providers on the Static configuration page of the Administration UI.
  2. Still in the Admin UI, navigate to the desired domain properties and tick off LinkedIn on the Authentication tab, then click Save.
    Image

That’s it! Your users should now be able to login using the LinkedIn button in the Login dialog.

See also