{"_id":"passport-github","_rev":"30-2e7ab8db3149e6f27d65e7afd2a893da","name":"passport-github","description":"GitHub authentication strategy for Passport.","dist-tags":{"latest":"1.1.0"},"versions":{"0.1.0":{"name":"passport-github","version":"0.1.0","description":"GitHub authentication strategy for Passport.","author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"repository":{"type":"git","url":"git://github.com/jaredhanson/passport-github.git"},"main":"./lib/passport-github","dependencies":{"passport-oauth":">= 0.1.0"},"engines":{"node":">= 0.4.0"},"keywords":["passport","github","auth","authn","authentication","identity"],"_npmUser":{"name":"jaredhanson","email":"jaredhanson@gmail.com"},"_id":"passport-github@0.1.0","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"e165366932de425256df5d28ff2491fbb513bc74","tarball":"https://registry.npmjs.org/passport-github/-/passport-github-0.1.0.tgz","integrity":"sha512-u7hMUAqF1dBTNOpgC8XqCbR+eGqsmlK6+3DZWNh244ljt6/sJhffGWzQxeAKnVU836YeOEqY940FOGXba46mWQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBaYGjEJKONjdGrNnvB4kJD1zz+5/NVcJ7J+ur0w36SlAiA8l80LmQ1S26vPP/DCtRxGl4UGeBZ9EOKZ292v5a54uQ=="}]},"maintainers":[{"name":"jaredhanson","email":"jaredhanson@gmail.com"}],"directories":{}},"0.1.1":{"name":"passport-github","version":"0.1.1","description":"GitHub authentication strategy for Passport.","author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"repository":{"type":"git","url":"git://github.com/jaredhanson/passport-github.git"},"bugs":{"url":"http://github.com/jaredhanson/passport-github/issues"},"main":"./lib/passport-github","dependencies":{"pkginfo":"0.2.x","passport-oauth":"0.1.x"},"devDependencies":{"vows":"0.6.x"},"scripts":{"test":"NODE_PATH=lib node_modules/.bin/vows test/*-test.js"},"engines":{"node":">= 0.4.0"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"keywords":["passport","github","auth","authn","authentication","identity"],"_npmUser":{"name":"jaredhanson","email":"jaredhanson@gmail.com"},"_id":"passport-github@0.1.1","_engineSupported":true,"_npmVersion":"1.1.0-beta-10","_nodeVersion":"v0.6.7","_defaultsLoaded":true,"dist":{"shasum":"ed549c8fcd42cb09dd0af6dfb86f7c255441ae8b","tarball":"https://registry.npmjs.org/passport-github/-/passport-github-0.1.1.tgz","integrity":"sha512-3mULOCbjb3OAf3g+dQqfec5hzyxxuPGK/AX1nZY8STV0vswDm+6rjO1tWus3+TORYaIVG1Q5Z9qn6oqLBKYHgA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDr88laQ9mJ/lNwhT6X2NXEAnBkeq0eNNLydmBtL6muIwIhAJqc/4m65r8+/NbWiruXANQQjid4QFjGmro9XgVLkUtk"}]},"maintainers":[{"name":"jaredhanson","email":"jaredhanson@gmail.com"}],"directories":{}},"0.1.2":{"name":"passport-github","version":"0.1.2","description":"GitHub authentication strategy for Passport.","author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"repository":{"type":"git","url":"git://github.com/jaredhanson/passport-github.git"},"bugs":{"url":"http://github.com/jaredhanson/passport-github/issues"},"main":"./lib/passport-github","dependencies":{"pkginfo":"0.2.x","passport-oauth":"0.1.x"},"devDependencies":{"vows":"0.6.x"},"scripts":{"test":"NODE_PATH=lib node_modules/.bin/vows test/*-test.js"},"engines":{"node":">= 0.4.0"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"keywords":["passport","github","auth","authn","authentication","identity"],"_npmUser":{"name":"jaredhanson","email":"jaredhanson@gmail.com"},"_id":"passport-github@0.1.2","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"0bef4e2c8430f2cae0071aca8ba98d89a7878c01","tarball":"https://registry.npmjs.org/passport-github/-/passport-github-0.1.2.tgz","integrity":"sha512-DHM0c4kTE/qCG6/naArbr9U9jinkCQHVlgJtMLe4I80myzcMU4ff5qqJ9ofUVC2V0sblGuusBFhcfp2lic2TYg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIApQ6wGa8R3Pnhm5gnadJsxMGwxWJtArrNrDfTYG4BrjAiAucy3XR5yzIGg0gG/5neGGESEW6lTBEDxF/63VEsnSAw=="}]},"maintainers":[{"name":"jaredhanson","email":"jaredhanson@gmail.com"}],"directories":{}},"0.1.3":{"name":"passport-github","version":"0.1.3","description":"GitHub authentication strategy for Passport.","author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"repository":{"type":"git","url":"git://github.com/jaredhanson/passport-github.git"},"bugs":{"url":"http://github.com/jaredhanson/passport-github/issues"},"main":"./lib/passport-github","dependencies":{"pkginfo":"0.2.x","passport-oauth":"0.1.x"},"devDependencies":{"vows":"0.6.x"},"scripts":{"test":"NODE_PATH=lib node_modules/.bin/vows test/*-test.js"},"engines":{"node":">= 0.4.0"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"keywords":["passport","github","auth","authn","authentication","identity"],"_npmUser":{"name":"jaredhanson","email":"jaredhanson@gmail.com"},"_id":"passport-github@0.1.3","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"bee24b19b071e8f69226fc05269e883cb3c7fa69","tarball":"https://registry.npmjs.org/passport-github/-/passport-github-0.1.3.tgz","integrity":"sha512-IBq7rwEbeVFtv/1hWzxy11oB9xxVbI7pYvpHAqNtZ4vE4165t0rArwFgX0/xQvdaxtOGlnWJ5FUO/rm7xJcgLw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG7YbV5x6xRtvdWz6pgQKuMIzMn7LX6o/KeDe9L6sAIlAiAtGVmfJ9aRMEYa0bQtZCO1qGSKmtCMZ1PnnQgj8OU4Ww=="}]},"maintainers":[{"name":"jaredhanson","email":"jaredhanson@gmail.com"}],"directories":{}},"0.1.4":{"name":"passport-github","version":"0.1.4","description":"GitHub authentication strategy for Passport.","keywords":["passport","github","auth","authn","authentication","identity"],"repository":{"type":"git","url":"http://github.com/jaredhanson/passport-github.git"},"bugs":{"url":"http://github.com/jaredhanson/passport-github/issues"},"author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib/passport-github","dependencies":{"pkginfo":"0.2.x","passport-oauth":"0.1.x"},"devDependencies":{"vows":"0.6.x"},"scripts":{"test":"NODE_PATH=lib node_modules/.bin/vows test/*-test.js"},"engines":{"node":">= 0.4.0"},"_id":"passport-github@0.1.4","dist":{"shasum":"8121e67c223ef2a9726f26694b2e6e9f3617c8ef","tarball":"https://registry.npmjs.org/passport-github/-/passport-github-0.1.4.tgz","integrity":"sha512-WoFC73++jdxEzgY7EY2wNtWEjDCDGhmpeKeenUpwI+gKsY5SHsj1fyttM4AW3dcxqbix1atH4yLUsI2yhuXcGQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbkjQwBWz+0GQcVi3w9jdjlYUGOrAephzscxOCdJIRHQIgFsOMxW+dehW/posOHSYlCBOR3RkLRZLYbiUmMSIB56k="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"jaredhanson","email":"jaredhanson@gmail.com"},"maintainers":[{"name":"jaredhanson","email":"jaredhanson@gmail.com"}],"directories":{}},"0.1.5":{"name":"passport-github","version":"0.1.5","description":"GitHub authentication strategy for Passport.","keywords":["passport","github","auth","authn","authentication","identity"],"repository":{"type":"git","url":"http://github.com/jaredhanson/passport-github.git"},"bugs":{"url":"http://github.com/jaredhanson/passport-github/issues"},"author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib/passport-github","dependencies":{"pkginfo":"0.2.x","passport-oauth":"0.1.x"},"devDependencies":{"vows":"0.6.x"},"scripts":{"test":"NODE_PATH=lib node_modules/.bin/vows test/*-test.js"},"engines":{"node":">= 0.4.0"},"_id":"passport-github@0.1.5","dist":{"shasum":"258ebb75af40cdc4e3af11be3a138b75c1f865c1","tarball":"https://registry.npmjs.org/passport-github/-/passport-github-0.1.5.tgz","integrity":"sha512-dscRbWb64kuSCmUxmdjMVaJ9rV2mS7GXARb/XDM4/Q4i6nyVL/MGxqoQdnvd2d0nnZtlWUmMe+Y0H0q0xBG27g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDi/N13c6IlglFRj103jRVEMbewcnWw4XAbyj1GjmIb1QIhAJzJ7hS7MbsSBpnYtVarkfyofyb9Ad8K5OQI5E/elQbb"}]},"_npmVersion":"1.1.62","_npmUser":{"name":"jaredhanson","email":"jaredhanson@gmail.com"},"maintainers":[{"name":"jaredhanson","email":"jaredhanson@gmail.com"}],"directories":{}},"1.0.0":{"name":"passport-github","version":"1.0.0","description":"GitHub authentication strategy for Passport.","keywords":["passport","github","auth","authn","authentication","identity"],"author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"repository":{"type":"git","url":"http://github.com/jaredhanson/passport-github.git"},"bugs":{"url":"http://github.com/jaredhanson/passport-github/issues"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib","dependencies":{"passport-oauth2":"1.x.x"},"devDependencies":{"mocha":"1.x.x","chai":"1.x.x"},"engines":{"node":">= 0.4.0"},"scripts":{"test":"mocha --reporter spec --require test/bootstrap/node test/*.test.js"},"gitHead":"2d7a32fd5d6b5c3280b0fec0cdabbb02c5703f47","homepage":"https://github.com/jaredhanson/passport-github","_id":"passport-github@1.0.0","_shasum":"44e24ee46cd7f6e8b0bb487e0d9c92e2095f6df8","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"jaredhanson","email":"jaredhanson@gmail.com"},"maintainers":[{"name":"jaredhanson","email":"jaredhanson@gmail.com"}],"dist":{"shasum":"44e24ee46cd7f6e8b0bb487e0d9c92e2095f6df8","tarball":"https://registry.npmjs.org/passport-github/-/passport-github-1.0.0.tgz","integrity":"sha512-Bp+auJthLwNzo9M3OINLQzgVd6YQND9RAdraQFemtNl/JM4LJu6RDuaeLWePqv9XYVguXm+03uWIiQelO8CpYw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBtZw6CuDE29vluva2zOThBPJC1+CLqWdJ8CQXrRVJxpAiEAuatoCdlFzHONpz5AsWuefaIuIu+PYiqcJ9xfh1Wsj7s="}]},"directories":{}},"1.1.0":{"name":"passport-github","version":"1.1.0","description":"GitHub authentication strategy for Passport.","keywords":["passport","github","auth","authn","authentication","identity"],"author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"repository":{"type":"git","url":"git+ssh://git@github.com/jaredhanson/passport-github.git"},"bugs":{"url":"http://github.com/jaredhanson/passport-github/issues"},"license":"MIT","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"main":"./lib","dependencies":{"passport-oauth2":"1.x.x"},"devDependencies":{"make-node":"0.3.x","mocha":"1.x.x","chai":"2.x.x","chai-passport-strategy":"1.x.x","proxyquire":"1.4.x"},"engines":{"node":">= 0.4.0"},"scripts":{"test":"mocha --require test/bootstrap/node test/*.test.js"},"gitHead":"c10321591d0521a2235613830562c2e8e2195c16","homepage":"https://github.com/jaredhanson/passport-github#readme","_id":"passport-github@1.1.0","_shasum":"8ce1e3fcd61ad7578eb1df595839e4aea12355d4","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"jaredhanson","email":"jaredhanson@gmail.com"},"maintainers":[{"name":"jaredhanson","email":"jaredhanson@gmail.com"}],"dist":{"shasum":"8ce1e3fcd61ad7578eb1df595839e4aea12355d4","tarball":"https://registry.npmjs.org/passport-github/-/passport-github-1.1.0.tgz","integrity":"sha512-XARXJycE6fFh/dxF+Uut8OjlwbFEXgbPVj/+V+K7cvriRK7VcAOm+NgBmbiLM9Qv3SSxEAV+V6fIk89nYHXa8A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRtcMD5oWKtVqZgwlzUdB05nuZFxty09HeqxD82dn++wIhAJyEgsYN5sltMrIeUkUyQk9jtNgaqEhBhB9aXn7I9mRv"}]},"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/passport-github-1.1.0.tgz_1454461074432_0.18503738730214536"},"directories":{}}},"readme":"# passport-github\n\n[![Build](https://img.shields.io/travis/jaredhanson/passport-github.svg)](https://travis-ci.org/jaredhanson/passport-github)\n[![Coverage](https://img.shields.io/coveralls/jaredhanson/passport-github.svg)](https://coveralls.io/r/jaredhanson/passport-github)\n[![Quality](https://img.shields.io/codeclimate/github/jaredhanson/passport-github.svg?label=quality)](https://codeclimate.com/github/jaredhanson/passport-github)\n[![Dependencies](https://img.shields.io/david/jaredhanson/passport-github.svg)](https://david-dm.org/jaredhanson/passport-github)\n\n\n[Passport](http://passportjs.org/) strategy for authenticating with [GitHub](https://github.com/)\nusing the OAuth 2.0 API.\n\nThis module lets you authenticate using GitHub in your Node.js applications.\nBy plugging into Passport, GitHub authentication can be easily and\nunobtrusively integrated into any application or framework that supports\n[Connect](http://www.senchalabs.org/connect/)-style middleware, including\n[Express](http://expressjs.com/).\n\n## Install\n\n```bash\n$ npm install passport-github\n```\n\n## Usage\n\n#### Create an Application\n\nBefore using `passport-github`, you must register an application with GitHub.\nIf you have not already done so, a new application can be created at\n[developer applications](https://github.com/settings/applications/new) within\nGitHub's settings panel.  Your application will be issued a client ID and client\nsecret, which need to be provided to the strategy.  You will also need to\nconfigure a callback URL which matches the route in your application.\n\n#### Configure Strategy\n\nThe GitHub authentication strategy authenticates users using a GitHub account\nand OAuth 2.0 tokens.  The client ID and secret obtained when creating an\napplication are supplied as options when creating the strategy.  The strategy\nalso requires a `verify` callback, which receives the access token and optional\nrefresh token, as well as `profile` which contains the authenticated user's\nGitHub profile.  The `verify` callback must call `cb` providing a user to\ncomplete authentication.\n\n```js\nvar GitHubStrategy = require('passport-github').Strategy;\n\npassport.use(new GitHubStrategy({\n    clientID: GITHUB_CLIENT_ID,\n    clientSecret: GITHUB_CLIENT_SECRET,\n    callbackURL: \"http://127.0.0.1:3000/auth/github/callback\"\n  },\n  function(accessToken, refreshToken, profile, cb) {\n    User.findOrCreate({ githubId: profile.id }, function (err, user) {\n      return cb(err, user);\n    });\n  }\n));\n```\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'github'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n```js\napp.get('/auth/github',\n  passport.authenticate('github'));\n\napp.get('/auth/github/callback', \n  passport.authenticate('github', { failureRedirect: '/login' }),\n  function(req, res) {\n    // Successful authentication, redirect home.\n    res.redirect('/');\n  });\n```\n\n## Examples\n\nDevelopers using the popular [Express](http://expressjs.com/) web framework can\nrefer to an [example](https://github.com/passport/express-4.x-facebook-example)\nas a starting point for their own web applications.  The example shows how to\nauthenticate users using Facebook.  However, because both Facebook and GitHub\nuse OAuth 2.0, the code is similar.  Simply replace references to Facebook with\ncorresponding references to GitHub.\n\n## Contributing\n\n#### Tests\n\nThe test suite is located in the `test/` directory.  All new features are\nexpected to have corresponding test cases.  Ensure that the complete test suite\npasses by executing:\n\n```bash\n$ make test\n```\n\n#### Coverage\n\nThe test suite covers 100% of the code base.  All new feature development is\nexpected to maintain that level.  Coverage reports can be viewed by executing:\n\n```bash\n$ make test-cov\n$ make view-cov\n```\n\n## Support\n\n#### Funding\n\nThis software is provided to you as open source, free of charge.  The time and\neffort to develop and maintain this project is dedicated by [@jaredhanson](https://github.com/jaredhanson).\nIf you (or your employer) benefit from this project, please consider a financial\ncontribution.  Your contribution helps continue the efforts that produce this\nand other open source software.\n\nFunds are accepted via [PayPal](https://paypal.me/jaredhanson), [Venmo](https://venmo.com/jaredhanson),\nand [other](http://jaredhanson.net/pay) methods.  Any amount is appreciated.\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2011-2016 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>\n\n","maintainers":[{"name":"jaredhanson","email":"jaredhanson@gmail.com"}],"time":{"modified":"2022-06-23T12:39:21.544Z","created":"2011-11-24T20:48:32.475Z","0.1.0":"2011-11-24T20:48:33.057Z","0.1.1":"2012-02-15T16:17:39.858Z","0.1.2":"2012-03-15T05:55:58.494Z","0.1.3":"2012-04-28T16:42:36.695Z","0.1.4":"2013-04-10T01:25:51.448Z","0.1.5":"2013-05-04T16:51:18.853Z","1.0.0":"2015-08-24T19:54:19.306Z","1.1.0":"2016-02-03T00:57:55.141Z"},"author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"repository":{"type":"git","url":"git+ssh://git@github.com/jaredhanson/passport-github.git"},"users":{"mswanson1524":true,"laiff":true,"kenkao":true,"mr-smiley":true,"mhaidarh":true,"chirag8642":true,"rocket0191":true,"serge-nikitin":true,"fabioper":true,"liyu0906":true,"iamninad":true},"homepage":"https://github.com/jaredhanson/passport-github#readme","keywords":["passport","github","auth","authn","authentication","identity"],"bugs":{"url":"http://github.com/jaredhanson/passport-github/issues"},"readmeFilename":"README.md","license":"MIT"}