Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

tonyxu-io/React-Linkedin-Login

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5c1a153 · Jan 9, 2024

History

97 Commits
Dec 21, 2022
Apr 2, 2018
Jul 1, 2023
Apr 2, 2018
Jul 10, 2020
Jan 21, 2019
Jul 23, 2020
Apr 2, 2018
Jan 21, 2019
Jan 9, 2024
Mar 1, 2020
Dec 11, 2022
Dec 11, 2022

Repository files navigation

React Linkedin Login

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

.github/workflows/workflow.yml

A simple app to demo LinkedIn login using LinkedIn OAuth 2.0

Screenshot

React Linkedin Login Screenshot

Demo

https://tony-linkedin-login.azurewebsites.net/

Usage

Clone

git clone https://github.com/tonyxu-io/React-Linkedin-Login.git

Install Dependencies

Install dependencies for server

cd React-Linkedin-Login
npm install

Install dependencies for client

cd client
npm install

Get LinkedIn App Credential from LinkedIn Developer Portal

  • client_id
  • client_secret

Configure 'http://localhost:3001/callback' as Oauth2.0 redirect uri

Create Environment Variables

/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

Build Client

/React-Linkedin-Login/client:

yarn run build

Start Server

/React-Linkedin-Login/:

PORT=3001 npm start

Visit http://localhost:3001/ in your browser.

Consumed SDK/API

Changelog

  • 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

Disclaimer

This is not an official sample app or documentation from LinkedIn. Please refer to LinkedIn API Documentation for official documentation and sample apps.