Skip to content

mdashikar/github-auth-with-passport.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This example demonstrates how to use Express 4.x and Passport to authenticate users using Github. Use this example as a starting point for your own web applications.

Instructions

To install this example on your computer, clone the repository and install dependencies.

$ git clone git@github.com:mdashikar/github-auth-with-passport.js.git
$ cd express-4.x-github-example
$ npm install

The example uses environment variables to configure the consumer key and consumer secret needed to access Github's API. Start the server with those variables set to the appropriate credentials.

$ CLIENT_ID=__GITHUB_CLIENT_ID__ CLIENT_SECRET=__GITHUB_CLIENT_SECRET__ node server.js

Open a web browser and navigate to http://localhost:3000/ to see the example in action.

About

Register github auth app to get clientId and clientSecret. https://github.com/settings/applications/new

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published