node-oauth-example
node-oauth-example copied to clipboard
Implementing OAuth 2.0 with Node.js
Node.js OAuth example
This is an example node application for mt post on implementing Githubs OAuth2 API.
In order to run the application:
- 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.
- Replace the values of the
clientIDandclientSecretvariables in the index.js file - Install dependencies by executing:
npm installoryarn. - Start the server by executing
node index.js - Navigate to http://localhost:8080 on your browser.