Skip to content

elmsley/node-red-linkedin

Repository files navigation

node-red-linkedin

Nodes related to integrating single sign-on with LinkedIn (OAuth 2.0)

Prerequisites

Installation

  • places files in the nodes directory of node-red

Setup

Usage

  • Open node-red to create a new flow
  • Connect the following nodes
    1. http request
    2. function(1)
    3. linkedin request access token
    4. linkedin basic profile
    5. function(2)
    6. http response
  • Deploy the flow
  • Click on the link from your html page to test the flow.

http request

  • This is the callback url "Authorized Redirect URLs" from the LinkedIn OAuth 2.0 configuration parameter. LinkedIn will call your application back with state and code.

function(1)

  • This is a placeholder for your state CSRF checking. Ensure the state that is returned is the same as the one you passed when you called LinkedIn.

request access token node

  • Configure the node ensuring that you set up client_id, client_secret, and create a redirect_uri correctly. client_secret is stored in node-red credentials.

basic profile

  • A list of attributes available to be returned can be toggled in the configuration window. By using msg.payload.access_token passed from the previous node, the profile can be requested. The msg.payload that is returned in a JSON object containing the LinkedIn result.

function(2)

  • This is a placeholder for post-processing. You can check the LinkedIn profile result, store information in your session etc.

http response

  • Return control back to the user.

Copyright and License

Copyright 2015 Jason Mah under the ISC License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published