Caution
This repo has been archived since the login API used by this repo has been deprecated. https://www.linkedin.com/developers/news/featured-updates/openid-connect-authentication
A simple app to demo LinkedIn login using LinkedIn OAuth 2.0
https://tony-linkedin-login.azurewebsites.net/
git clone https://github.com/tonyxu-io/React-Linkedin-Login.git
Install dependencies for server
cd React-Linkedin-Login
npm install
Install dependencies for client
cd client
npm install
- client_id
- client_secret
Configure 'http://localhost:3001/callback' as Oauth2.0 redirect uri
/React-Linkedin-Login/.env
EXPRESS_APP_CLIENT_ID=${Your-Client-ID}
EXPRESS_APP_CLIENT_SECRET=${Your-Client-Secret}
EXPRESS_APP_REDIRECT_URI=http://localhost:3001/callback
/React-Linkedin-Login/client/.env
REACT_APP_CLIENT_ID=${Your-Client-ID}
REACT_APP_REDIRECT_URI=http://localhost:3001/callback
/React-Linkedin-Login/client:
yarn run build
/React-Linkedin-Login/:
PORT=3001 npm start
Visit http://localhost:3001/
in your browser.
- Mar 1, 2020: Migrated hosting platform from GAE to Azure, and CI/CD platform from Travis CI to GitHub Actions
- Jan 20, 2019: Migrated JS SDK related API usage (due to deprecation of LinkedIn JS SDK) to REST API
- Aug 1, 2018: Removed summary check in case user doesn't have summary content
- April 2, 2018: Created first version using JS SDK to load profile
This is not an official sample app or documentation from LinkedIn. Please refer to LinkedIn API Documentation for official documentation and sample apps.