This project is a simple solution to use Express 4.x and Passport to authenticate users using github.
Make sure to configure the mongodb uri on gh-auth.js
- go to https://github.com/settings/applications/new.
- choose a name
- use http://127.0.0.1:5045 as Homepage URL
- Give a description(optional), though this will be displayed to all users of your application.
- authorization callback URL will be http://127.0.0.1:5045/auth/github/callback
- click on register application and the app is sha-pra-pra!
$ git clone git@github.com:mockingloris/node-express-4-passport-github.git
$ cd node-express-4-passport-github
$ npm install
$ npm start
Your app should now be running on localhost:5054.
I will try to update this readme... hope you have an idea how it works when you see the code. Especially my use of the handlebars templating engine.
Also note that the node engine I used for this project is Node 6, you will see the version on the package.json file.
For now you can only get the user email and name. I'm working on getting the user's repos as well.