{"_id":"passport-google-oauth1","_rev":"3-a39c7a2908613065e346edc84817ff5e","name":"passport-google-oauth1","description":"Google (OAuth 1.0) authentication strategy for Passport.","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"passport-google-oauth1","version":"1.0.0","description":"Google (OAuth 1.0) authentication strategy for Passport.","keywords":["passport","google","auth","authn","authentication","identity"],"author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"repository":{"type":"git","url":"git://github.com/jaredhanson/passport-google-oauth1.git"},"bugs":{"url":"http://github.com/jaredhanson/passport-google-oauth1/issues"},"license":"MIT","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"main":"./lib","dependencies":{"passport-oauth1":"1.x.x"},"devDependencies":{"make-node":"0.3.x","mocha":"1.x.x","chai":"2.x.x","chai-passport-strategy":"1.x.x"},"scripts":{"test":"mocha --require test/bootstrap/node test/*.test.js"},"gitHead":"81a5a2b7227096a7e7798914d8e42d993354d4c5","homepage":"https://github.com/jaredhanson/passport-google-oauth1#readme","_id":"passport-google-oauth1@1.0.0","_shasum":"af74a803df51ec646f66a44d82282be6f108e0cc","_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":"af74a803df51ec646f66a44d82282be6f108e0cc","tarball":"https://registry.npmjs.org/passport-google-oauth1/-/passport-google-oauth1-1.0.0.tgz","integrity":"sha512-qpCEhuflJgYrdg5zZIpAq/K3gTqa1CtHjbubsEsidIdpBPLkEVq6tB1I8kBNcH89RdSiYbnKpCBXAZXX/dtx1Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEdQaquub6NzABo4k2yE/GQjYYuygWB2vyw/uX3O7zd2AiB1aQJxKW869xer0q5PumMB8saIXEYPtRAeKey21UIsUg=="}]},"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/passport-google-oauth1-1.0.0.tgz_1454554240706_0.11406115093268454"}}},"readme":"**DEPRECATED:** On April 20, 2015, Google's support for OAuth 1.0 was officially\ndeprecated and is no longer supported.  You are encouraged to migrate to OAuth\n2.0 and [passport-google-oauth20](https://github.com/jaredhanson/passport-google-oauth2)\nas soon as possible.\n\n\n# passport-google-oauth1\n\n[![Build](https://img.shields.io/travis/jaredhanson/passport-google-oauth1.svg)](https://travis-ci.org/jaredhanson/passport-google-oauth1)\n[![Coverage](https://img.shields.io/coveralls/jaredhanson/passport-google-oauth1.svg)](https://coveralls.io/r/jaredhanson/passport-google-oauth1)\n[![Quality](https://img.shields.io/codeclimate/github/jaredhanson/passport-google-oauth1.svg?label=quality)](https://codeclimate.com/github/jaredhanson/passport-google-oauth1)\n[![Dependencies](https://img.shields.io/david/jaredhanson/passport-google-oauth1.svg)](https://david-dm.org/jaredhanson/passport-google-oauth1)\n\n\n[Passport](http://passportjs.org/) strategy for authenticating with [Google](http://www.google.com/)\nusing the OAuth 1.0a API.\n\nThis module lets you authenticate using Google in your Node.js applications.\nBy plugging into Passport, Google 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    $ npm install passport-google-oauth1\n\n## Usage\n\n#### Create an Application\n\nBefore using `passport-google-oauth1`, you must register your domain with Google.\nIf you have not already done so, a new domain can be added at [Google Accounts](https://accounts.google.com/ManageDomains).\nYour domain will be issued an OAuth Consumer Key and OAuth Consumer Secret,\nwhich need to be provided to the strategy.\n\n#### Configure Strategy\n\nThe Google authentication strategy authenticates users using a Google account\nand OAuth tokens.  The consumer key and consumer secret obtained when\nregistering a domain are supplied as options when creating the strategy.  The\nstrategy also requires a `verify` callback, which receives the access token and\ncorresponding secret as arguments, as well as `profile` which contains the\nauthenticated user's Google profile.   The `verify` callback must call `cb`\nproviding a user to complete authentication.\n\n    passport.use(new GoogleStrategy({\n        consumerKey: 'www.example.com',\n        consumerSecret: GOOGLE_CONSUMER_SECRET,\n        callbackURL: \"http://127.0.0.1:3000/auth/google/callback\"\n      },\n      function(token, tokenSecret, profile, cb) {\n        User.findOrCreate({ googleId: profile.id }, function (err, user) {\n          return cb(err, user);\n        });\n      }\n    ));\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'google'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n    app.get('/auth/google',\n      passport.authenticate('google', { scope: 'https://www.google.com/m8/feeds' }));\n    \n    app.get('/auth/google/callback', \n      passport.authenticate('google', { failureRedirect: '/login' }),\n      function(req, res) {\n        // Successful authentication, redirect home.\n        res.redirect('/');\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-twitter-example)\nas a starting point for their own web applications.  The example shows how to\nauthenticate users using Twitter.  However, because both Twitter and Google\nuse OAuth 1.0, the code is similar.  Simply replace references to Twitter with\ncorresponding references to Google.\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\nAll new feature development is expected to have test coverage.  Patches that\nincrese test coverage are happily accepted.  Coverage reports can be viewed by\nexecuting:\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) 2012-2016 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>\n","maintainers":[{"name":"jaredhanson","email":"jaredhanson@gmail.com"}],"time":{"modified":"2022-06-23T12:41:39.555Z","created":"2016-02-04T02:50:41.665Z","1.0.0":"2016-02-04T02:50:41.665Z"},"homepage":"https://github.com/jaredhanson/passport-google-oauth1#readme","keywords":["passport","google","auth","authn","authentication","identity"],"repository":{"type":"git","url":"git://github.com/jaredhanson/passport-google-oauth1.git"},"author":{"name":"Jared Hanson","email":"jaredhanson@gmail.com","url":"http://www.jaredhanson.net/"},"bugs":{"url":"http://github.com/jaredhanson/passport-google-oauth1/issues"},"license":"MIT","readmeFilename":"README.md"}