Menu Close


Login with Github

An app that implements “Login with GitHub” functionality in React

Login Screen

Usage and Setup

  • Clone this repo. Go into the root folder and run yarn to install the dependencies.
  • Login to your Github account and create an OAuth app by following the steps provided here ( Note: For this example, while creating the OAuth app, you can set your Homepage URL to http://localhost:3000/ and Authorization callback URL to http://localhost:3000/login if you are running your app locally.
  • Create a .env file in the root folder and set these variables: 

    REACT_APP_CLIENT_ID=Your Client ID from Github
    REACT_APP_CLIENT_SECRET=Your Client Secret from Github
  • Run yarn start to start the app
View Source Code
Posted in Development