Implementing OAuth 2.0 with Node.js
Clone or download
Latest commit 8c5ddf0 Jun 24, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public Add welcome page Jun 24, 2018
.gitignore working example Jun 24, 2018
README.md Add welcome page Jun 24, 2018
index.js Add welcome page Jun 24, 2018
package.json working example Jun 24, 2018
yarn.lock working example Jun 24, 2018

README.md

Node.js OAuth example

Read the blog post here

This is an example node application that implements Githubs OAuth2 API.

In order to run the application:

  1. Register your new application on Github : https://github.com/settings/applications/new. In the "callback URL" field, enter "http://localhost:8080/oauth/redirect". Once you register, you will get a client ID and client secret.
  2. Replace the values of the clientID and clientSecret variables in the index.js file
  3. Install dependencies by executing: npm install or yarn.
  4. Start the server by executing node index.js
  5. Navigate to http://localhost:8080 on your browser.