Skip to content

json-HB/github-oauth-login

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A very simple demo of OAuth 2.0 using Node.js,to add GitHub login to your app and access GitHub API.

Online demo

haibo.online

Step one: register the app

Register the app on Github : https://github.com/settings/applications/new .

Once register, you will get a client ID and a client secret.

Step two: get the code

First, clone the repo.

$ git clone https://github.com/json-HB/githun-oauth-login.git
$ cd node-oauth-demo

Second, modify the config.

  • index.js: replace the values of the clientID and clientSecret variables.
  • public/index.html: replace the values of the client_id variable.

Third, install the dependencies.

$ npm install

Step three: run the server

Now, run the server.

$ node index.js

Visit http://localhost:8080 in your browser, and click the link to login GitHub.

About

github OAuth login demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •