{"_id":"@passport-next/passport-google-oauth2","_rev":"11-2623c12186f0edb36a0c510605f5f6fb","name":"@passport-next/passport-google-oauth2","dist-tags":{"latest":"1.0.0","beta":"1.0.0-beta.1"},"versions":{"0.2.0":{"name":"@passport-next/passport-google-oauth2","version":"0.2.0","description":"Passport strategy for Google OAuth 2.0","main":"./lib/oauth2.js","directories":{"example":"examples","test":"test"},"dependencies":{"@passport-next/passport-oauth2":"1.5.x"},"devDependencies":{"vows":"^0.8.0"},"scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/passport-next/passport-google-oauth2.git"},"keywords":["auth","google","google+","passportjs","oauth2"],"author":{"name":"Rowan Wookey","email":"admin@rwky.net"},"bugs":{"url":"http://github.com/passport-next/passport-google-oauth2/issues"},"license":"MIT","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"gitHead":"706213f0723e37d3d9c0c49032f819f4160c5f3e","homepage":"https://github.com/passport-next/passport-google-oauth2#readme","_id":"@passport-next/passport-google-oauth2@0.2.0","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"rwky","email":"admin@rwky.net"},"dist":{"integrity":"sha512-usJHscy+Qr0tzRZJTzs1ySIgYaLD1ZLRfVZTxHTQsvaavRApUq6BaUnNF9RHC7AMo4YQy/Rk/OknmzLzi/Gpeg==","shasum":"0cf9f517b9dd3ddf122ddb030b48a2066f6b8488","tarball":"https://registry.npmjs.org/@passport-next/passport-google-oauth2/-/passport-google-oauth2-0.2.0.tgz","fileCount":12,"unpackedSize":17756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbNp+VCRA9TVsSAnZWagAAokQP/3w0X6H3F/zxO616luM7\nRIF9qISJe/2YtgdNHtZ+7MU2QAsBsEOxuOGoblwox60dyRGfeLKQxIbE0TPS\nwmVg/TsY+UYB89yD7yBZYv78kmWunqjy1Qe1kds1+c8g3nTi7xiToG6VlzNB\nSyZ2t5gMjrsDyESrXfrDNjkD4kwI/6b/21rMnI7BKLyVKAwJOlo0lv+Nyi2c\ndMslNCX8nHk5+LZaICJG0u4KkEHb9yRmCaC30Q2htDohKksQz3zUkMKN4PUa\n2r1abEnS5Eyd5FkiHdhTwqqTxKBAV344dbuPaeVRvjZQIEyO2ZI1F9jmToCP\nuDxJFz99De7ftanI9i4HlWwhZNXvCGvGH0ICOJV1TBmQ6IDfhzuQBQ2mTOOg\n9pPTpWZXGiBMJfydph1pGNvY4MnRYpBgDehRNYkOmo2tuJiw45IrB8uLlKDi\nGkvw5QPf7SdzTorHO/O0/RLgFH5TcO82iZ4ZFUBLwioBMOupeQX06aCJqDA/\nj9rxDWaApV2tjM6Z8iJkneec7jYm4/VXMPIjpHpjmW1bsangXq8MfnKdqO6f\noDdLJfGSMLM+EdjJHS9u0jmbzY/wllUryd4AiFQVKV2zwzBqRU/HkdrgJGrw\n7MbT6zHdj9mf4yInvXyVm/gn2oyW4mJc0EeExZs56LN/85lOWLr7aCAoZC2F\n5HxJ\r\n=2BnQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTWgwn3TyyimdgbGgjS8dM1WyiAuumW/hDe/dUQZC3GgIhAOSLTGFveGLwPYv+HWykQZHZng1nohMxXjc6fGYdPh6U"}]},"maintainers":[{"name":"rwky","email":"admin@rwky.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-google-oauth2_0.2.0_1530306453757_0.4492489725006543"},"_hasShrinkwrap":false},"0.3.0":{"name":"@passport-next/passport-google-oauth2","version":"0.3.0","description":"Passport strategy for Google OAuth 2.0","main":"./lib/oauth2.js","directories":{"example":"examples","test":"test"},"dependencies":{"@passport-next/passport-oauth2":"1.7.x"},"devDependencies":{"vows":"^0.8.0"},"scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/passport-next/passport-google-oauth2.git"},"keywords":["auth","google","google+","passportjs","oauth2"],"author":{"name":"Rowan Wookey","email":"admin@rwky.net"},"bugs":{"url":"http://github.com/passport-next/passport-google-oauth2/issues"},"license":"MIT","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"gitHead":"e4b48e467189f9dc9214788eecef7e51bb4a7ea6","homepage":"https://github.com/passport-next/passport-google-oauth2#readme","_id":"@passport-next/passport-google-oauth2@0.3.0","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"rwky","email":"admin@rwky.net"},"dist":{"integrity":"sha512-c38uc/hbU5HH3GA3tbHAPCxCMjfxDTZYVkJrzhtO1UAejpkEVcc698mzEErX641uOk4+OzVb9TwcJtScPdQ9EA==","shasum":"e04046ced8ac45a2383b02bead4c619351bd6fbf","tarball":"https://registry.npmjs.org/@passport-next/passport-google-oauth2/-/passport-google-oauth2-0.3.0.tgz","fileCount":12,"unpackedSize":18160,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb3hAaCRA9TVsSAnZWagAA67IP/2XgbfH5eRxEuB+TRCF7\n/SYYeCqA7ZwUXbxodUq71IFBOjjtL0VxX0KjRM0lL2anr0+OGIiiWJJjmN7Z\nOZQdDmOiI37lLEFBrrIrqcoVUHVOOPkxu0XHsU8ifiFHYbDQtuA0D51d75Ia\nhjhuUtq8NN7AQcPnumAH/fUpUi1UNP7CAsP+iUWJWnCJ2fvfQix6gX/bQ2cH\nZOfxA2KCYPWwjupF/sU/YiZlOvSfaxkMT8V1oEmGA1vBa+eZHMVzIs9RZ2Uc\nG0J/7+izgDn5laFCzavsau55G/+GdatsdSI8tvXDAbv5LkfYXGeOmFjD5MTb\ngCVn9YAHM3NLedfgyTUyBMEZPbkWkiXnSFDkw33I3LSNsl9SPNUzkGud3nt6\nTDacTJZlQ04fc78+hZBNnonAQD88QGcqT5QPsYqWHeZVBeBVybPZzD2qeGw5\ne1nqBA6c9lNFjQTyGmrFTU2EwFDtHfg9JWO9B4GTR5TSnJWuDopuxs8023xP\n3tJOmoVTYV9l8cB4bc8FZwG4+1rvokgvujTSJ407VkDrLbTmIdR2MIGwG6eN\nyjIKxiyA/qUwGKPRpG7WBVtSiJq0i/9kp8O5yb/R7kZTcLuQvOlOl40/RmOg\nGuiLxVfBtZfAhK5fnWaXgY36S0xpMteWI3P9ziphK4gASw+oJlbQ8KPPvOb6\n2dxZ\r\n=hZmT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBst90IveZ5oQUy8L0WGTXaxqPijj5Uz0rAP63fB9WIpAiEAj8ify7WoaiIUj5ZazYiFS974Y+0VsHZPjhbEwi5ny2w="}]},"maintainers":[{"name":"rwky","email":"admin@rwky.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-google-oauth2_0.3.0_1541279770284_0.8560287184390154"},"_hasShrinkwrap":false},"1.0.0-beta.0":{"name":"@passport-next/passport-google-oauth2","version":"1.0.0-beta.0","description":"Google (OAuth 2.0) authentication strategy for Passport.","keywords":["passport","google","auth","authn","authentication","identity"],"author":{"name":"Rowan Wookey","email":"admin@rwky.net"},"repository":{"type":"git","url":"git+https://github.com/passport-next/passport-google-oauth2.git"},"bugs":{"url":"http://github.com/passport-next/passport-google-oauth2/issues"},"license":"MIT","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"main":"./lib","dependencies":{"@passport-next/passport-oauth2":"1.7.x"},"devDependencies":{"make-node":"0.3.x","mocha":"5.x.x","chai":"4.x.x","@passport-next/chai-passport-strategy":"1.1.x"},"engines":{"node":">=6"},"scripts":{"test":"mocha --require test/bootstrap/node test/*.test.js test/**/*.test.js"},"readme":"# Passport strategy for Google OAuth 2.0\n\n[![NPM version](https://img.shields.io/npm/v/@passport-next/passport-google-oauth2.svg)](https://www.npmjs.com/package/@passport-next/passport-google-oauth2)\n[![Build Status](https://travis-ci.org/passport-next/passport-google-oauth2.svg?branch=master)](https://travis-ci.org/passport-next/passport-google-oauth2)\n[![Coverage Status](https://coveralls.io/repos/github/passport-next/passport-google-oauth2/badge.svg?branch=master)](https://coveralls.io/github/passport-next/passport-google-oauth2?branch=master)\n[![Maintainability](https://api.codeclimate.com/v1/badges/7c817d8118420a47390a/maintainability)](https://codeclimate.com/github/passport-next/passport-google-oauth2/maintainability)\n[![Dependencies](https://david-dm.org/passport-next/passport-google-oauth2.png)](https://david-dm.org/passport-next/passport-google-oauth2)\n<!--[![SAST](https://gitlab.com/passport-next/passport-google-oauth2/badges/master/build.svg)](https://gitlab.com/passport-next/passport-google-oauth2/badges/master/build.svg)-->\n\n## Install\n\n```bash\n$ npm install @passport-next/passport-google-oauth2\n```\n\n## Usage\n\n#### Create an Application\n\nBefore using `@passport-next/passport-google-oauth2`, you must register an application with\nGoogle.  If you have not already done so, a new project can be created in the\n[Google Developers Console](https://console.developers.google.com/).\nYour application will be issued a client ID and client secret, which need to be\nprovided to the strategy.  You will also need to configure a redirect URI which\nmatches the route in your application.\n\n#### Configure Strategy\n\nThe Google authentication strategy authenticates users using a Google 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\nGoogle profile.  The `verify` callback must call `cb` providing a user to\ncomplete authentication.\n\n```javascript\nvar GoogleStrategy = require('@passport-next/passport-google-oauth2').Strategy;\n\npassport.use(new GoogleStrategy({\n    clientID: GOOGLE_CLIENT_ID,\n    clientSecret: GOOGLE_CLIENT_SECRET,\n    callbackURL: \"http://www.example.com/auth/google/callback\"\n  },\n  function(accessToken, refreshToken, profile, cb) {\n    User.findOrCreate({ googleId: profile.id }, function (err, user) {\n      return cb(err, user);\n    });\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```javascript\napp.get('/auth/google',\n  passport.authenticate('google', { scope: ['profile'] }));\n\napp.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-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 Google\nuse OAuth 2.0, the code is similar.  Simply replace references to Facebook with\ncorresponding references to Google.\n","readmeFilename":"README.md","gitHead":"54f3954591f9aa7eca4228681ed2108c52ed7ca4","homepage":"https://github.com/passport-next/passport-google-oauth2#readme","_id":"@passport-next/passport-google-oauth2@1.0.0-beta.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"rwky","email":"admin@rwky.net"},"dist":{"integrity":"sha512-ZApGGJaorp4C3vsb5MQAd8/DjIdMZ1PNlvflDV5xiS5IqjsEMrsiz0CHAMu771FnYwCOKk1LCew4fXxVMPCL6w==","shasum":"f230e2aef7b6e58e22842570750dd4930f22c215","tarball":"https://registry.npmjs.org/@passport-next/passport-google-oauth2/-/passport-google-oauth2-1.0.0-beta.0.tgz","fileCount":11,"unpackedSize":17733,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcQHN/CRA9TVsSAnZWagAARLsP/iUgKt/2VHlxsZMzvJ1W\nEBma3w0E94lLl1mU+1LA5DopAcq7DaxeZny0YZJDjXpzgzZjy5ez9Yhu31e6\nyccvRJtK/kyNjFUpfQF+6yhzHThgb8l9rZhy5B/G6mPEGTvpOo21xTeoDtNx\nLIzL2abwoxp3kHUxOR186+ImswYWo3CUF+Ief0/SgEdLmODE4wZhDmbr9Fqw\nabreyOM3GqgHu8m76edyg2IgC0P0vNW2SLb7g0RZw0Mmys2iXd/6rVIr8ANp\ny3ebSke71oT4JmW3OUuuszi6+5+85FeI+Fb3RdEr7unGqAo6lSB0X37CboGH\nAmbrLrp6apVVcm1Tf7bagDF6tAq0fPZs30p+nx8ajhnHfIoIto0aojgqy4Aw\n51pcfxdzoYWHwggKmL+VFAlKK++M526PpDYnfNX+J9w+xierkav5bN0rvTE7\ns1zmS72EkFKwkgm4c3wUFcFIdHOfTmBN/GLxF0GxyaMc56ujCewkMHapSukN\n7rprPRX3x4wvnNf7BY/nJYu/iV1qrNn59BaxnmesKlEO6151slwm/oa7o+uw\nvXnMmvNcB9Y19rkilIz4+2PmhY7CoaxZSmHalckVdyElbEuH94sTyV7Z5ZVf\n8/j9n4aRKKZd9ebQkyAJmIwZq6oSQZnh2cQubYRh1nTWH//wOp5KC31GaB2u\nshaP\r\n=oCha\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHiRyD8eIo9Yf7c3tW+HwOPPRu+BntSPM79mQKvKyz9FAiEAo7sB+w1UYOVgLROoYmtbrdLs5F/aHptNisax8AN3TIs="}]},"maintainers":[{"email":"adam@hathcock.co.uk","name":"adamhathcock"},{"email":"wildfiction@gmail.com","name":"guyellis"},{"email":"admin@rwky.net","name":"rwky"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-google-oauth2_1.0.0-beta.0_1547727742784_0.9617707762910634"},"_hasShrinkwrap":false},"1.0.0-beta.1":{"name":"@passport-next/passport-google-oauth2","version":"1.0.0-beta.1","description":"Google (OAuth 2.0) authentication strategy for Passport.","keywords":["passport","google","auth","authn","authentication","identity"],"author":{"name":"Rowan Wookey","email":"admin@rwky.net"},"repository":{"type":"git","url":"git+https://github.com/passport-next/passport-google-oauth2.git"},"bugs":{"url":"http://github.com/passport-next/passport-google-oauth2/issues"},"license":"MIT","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"main":"./lib","dependencies":{"@passport-next/passport-oauth2":"1.7.x"},"devDependencies":{"make-node":"0.3.x","mocha":"5.x.x","chai":"4.x.x","@passport-next/chai-passport-strategy":"1.1.x","eslint-config-airbnb-base":"13.1.x","eslint-plugin-import":"2.14.x","eslint":"5.8.x"},"engines":{"node":">=6"},"scripts":{"spec":"mocha --require test/bootstrap/node test/*.test.js test/**/*.test.js","lint":"eslint --ext .js . --max-warnings 0","lintfix":"eslint --ext .js . --fix","test":"npm run lint && npm run spec"},"readme":"# Passport strategy for Google OAuth 2.0\n\n[![NPM version](https://img.shields.io/npm/v/@passport-next/passport-google-oauth2.svg)](https://www.npmjs.com/package/@passport-next/passport-google-oauth2)\n[![Build Status](https://travis-ci.org/passport-next/passport-google-oauth2.svg?branch=master)](https://travis-ci.org/passport-next/passport-google-oauth2)\n[![Coverage Status](https://coveralls.io/repos/github/passport-next/passport-google-oauth2/badge.svg?branch=master)](https://coveralls.io/github/passport-next/passport-google-oauth2?branch=master)\n[![Maintainability](https://api.codeclimate.com/v1/badges/7c817d8118420a47390a/maintainability)](https://codeclimate.com/github/passport-next/passport-google-oauth2/maintainability)\n[![Dependencies](https://david-dm.org/passport-next/passport-google-oauth2.png)](https://david-dm.org/passport-next/passport-google-oauth2)\n<!--[![SAST](https://gitlab.com/passport-next/passport-google-oauth2/badges/master/build.svg)](https://gitlab.com/passport-next/passport-google-oauth2/badges/master/build.svg)-->\n\n## Install\n\n```bash\n$ npm install @passport-next/passport-google-oauth2\n```\n\n## Usage\n\n#### Create an Application\n\nBefore using `@passport-next/passport-google-oauth2`, you must register an application with\nGoogle.  If you have not already done so, a new project can be created in the\n[Google Developers Console](https://console.developers.google.com/).\nYour application will be issued a client ID and client secret, which need to be\nprovided to the strategy.  You will also need to configure a redirect URI which\nmatches the route in your application.\n\n#### Configure Strategy\n\nThe Google authentication strategy authenticates users using a Google 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\nGoogle profile.  The `verify` callback must call `cb` providing a user to\ncomplete authentication.\n\n```javascript\nvar GoogleStrategy = require('@passport-next/passport-google-oauth2').Strategy;\n\npassport.use(new GoogleStrategy({\n    clientID: GOOGLE_CLIENT_ID,\n    clientSecret: GOOGLE_CLIENT_SECRET,\n    callbackURL: \"http://www.example.com/auth/google/callback\"\n  },\n  function(accessToken, refreshToken, profile, cb) {\n    User.findOrCreate({ googleId: profile.id }, function (err, user) {\n      return cb(err, user);\n    });\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```javascript\napp.get('/auth/google',\n  passport.authenticate('google', { scope: ['profile'] }));\n\napp.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-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 Google\nuse OAuth 2.0, the code is similar.  Simply replace references to Facebook with\ncorresponding references to Google.\n","readmeFilename":"README.md","gitHead":"3bad2761f32b91e319e603c30ac0e144b9349c3d","homepage":"https://github.com/passport-next/passport-google-oauth2#readme","_id":"@passport-next/passport-google-oauth2@1.0.0-beta.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"rwky","email":"admin@rwky.net"},"dist":{"integrity":"sha512-hrPV6BAb999wMvfXqe0IkHgmL2J0Ktzp7UzT6VpdtmreIrDhblLpKXzNCleHh0llZKdVInPUyluNSfn9Bi/EkA==","shasum":"25db11763d7ec345ed45ec8189d73224b9ad93e5","tarball":"https://registry.npmjs.org/@passport-next/passport-google-oauth2/-/passport-google-oauth2-1.0.0-beta.1.tgz","fileCount":13,"unpackedSize":18427,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcQKikCRA9TVsSAnZWagAAXD8P+gPfOIB2LEq5I+xVyFfY\nbs/Iwl0QNL13pf45VDvwv1yhoxqi86KUsYSuMFEFKEUpRjy6nuCGHRhyDyiF\n748JtJVsp9hg1+JP8dzrPK/N5dKvRyhKuTKwRoSREL5mEQ5ufnFl4GKUnzFW\nyZtPHclzYomyHTXH9HThB81ubrsGcQ7VYFS1sLoWo6xDqEQ0IWB7BjngZUYa\nUFhq93UdpE/0YU4KdVXzHjIghQ2Cy/cSqYENci9gJdBodo4JyJUDp4afz3cr\nhM7w5xM62qSl/0b1hB/eGelqdfIawx0mDB1+RLAB9PUxyMmxnVExSi+Eg7b0\nBDDAIhDVUVNhDmDGDPqD7+ubuN40P5ADgFWnaOb01jg4Z7sW5x2LqAMKygfq\n4Q+fhpvqDNIMLARCThZymWOE0A65rH0sb6XiQC7q8gSfGgb9jSIo39MAitBN\nQsReW9W1k2bpR6eUDebr5+1z8S6k9YDve0sBrjNI6tsjLLMpDRTKbVC7zhh5\nw0FYGGAY+45dck5jGQZ9Eh1JvZFaP12Y3J8Xw7RWkaGmRbY8WnH9/NdtWHPk\n6yqwpPsMIoBRpcJiKENkL2DKmsO18MsjY7o5bD2U5lIlBhCCfHmTjTfyCMJl\n/LzOBVI8zrtyzagPpC9rmL7T59vuBjchDCdTZliFitwNIGgEYRkvIOtxBs+R\nut4d\r\n=JWea\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGQsD5eFR+FrgNomWDOLejY7WR4BFGMgK8NBoohbDCDAAiEAurmh/0h6BzeuafCiIP1CaKjgtmC8XbM4e8z1WEE+xdI="}]},"maintainers":[{"email":"adam@hathcock.co.uk","name":"adamhathcock"},{"email":"wildfiction@gmail.com","name":"guyellis"},{"email":"admin@rwky.net","name":"rwky"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-google-oauth2_1.0.0-beta.1_1547741348201_0.7702687520102556"},"_hasShrinkwrap":false},"1.0.0":{"name":"@passport-next/passport-google-oauth2","version":"1.0.0","description":"Google (OAuth 2.0) authentication strategy for Passport.","keywords":["passport","google","auth","authn","authentication","identity"],"author":{"name":"Rowan Wookey","email":"admin@rwky.net"},"repository":{"type":"git","url":"git+https://github.com/passport-next/passport-google-oauth2.git"},"bugs":{"url":"http://github.com/passport-next/passport-google-oauth2/issues"},"license":"MIT","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"main":"./lib","dependencies":{"@passport-next/passport-oauth2":"1.7.x"},"devDependencies":{"make-node":"0.3.x","mocha":"5.x.x","chai":"4.x.x","@passport-next/chai-passport-strategy":"1.1.x","eslint-config-airbnb-base":"13.1.x","eslint-plugin-import":"2.14.x","eslint":"5.12.x"},"engines":{"node":">=6"},"scripts":{"spec":"mocha --require test/bootstrap/node test/*.test.js test/**/*.test.js","lint":"eslint --ext .js . --max-warnings 0","lintfix":"eslint --ext .js . --fix","test":"npm run lint && npm run spec"},"gitHead":"90bc5a49c1e29ba7c1e514b972015889280bf5ae","homepage":"https://github.com/passport-next/passport-google-oauth2#readme","_id":"@passport-next/passport-google-oauth2@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"rwky","email":"admin@rwky.net"},"dist":{"integrity":"sha512-rbAtK0eGgjQhT/MqMSuN7Mxy4XTr1/LINk5rYPVezP3MfkVYuK20V0XW9fg1ikFMvyxSdmfLTyYduud7SfFSqw==","shasum":"cadef72d9ef42d549a5578eab338febdf234f806","tarball":"https://registry.npmjs.org/@passport-next/passport-google-oauth2/-/passport-google-oauth2-1.0.0.tgz","fileCount":13,"unpackedSize":18421,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2VnRCRA9TVsSAnZWagAATlsP/0xBqaJb52/thUg07qMs\nKBAjakkgIOlpSXq6f2tHCarC+r0xxZm5y61hSaDgppTqStt5oxRLR6V+fFbh\nJXTjUuzmsT2xct58JKMHJeZ0Sbt8GwmYWB5SWK5NQuvTRTPBJ1g1w5hgwi77\nmQqfSYSie04t30sOKPTowff0xmrrAifGhdpXT8r0SjpAxDVunoKmGdIILLcR\n+mUrqON3JTnvuZT69bG5x8AuLnsy9Gg5orSoi/idETrd0EZC4FYqj0zzbIxI\n/XnRo3TsJmavUGDQvK/msub1Z5HupH7ROJbyrbbKAaSmY9r7fbum1QIo2NzH\np9AUKOUAna7KGqlUAHeXpi8iHGSq5iUsvkGxBCsvDUJORZ8iscLb2HGlPxO5\n8gjAEGAyLNiGcHg6xvuvPYn9WsBxM2lFp6C7+lO+jqPPqGeGRgCjfxOhgB3K\nPjzqtNllminFeae9SP7KIXfv/aOL2P5lER3MufZjQDAgee92Htg/0ON9qi3W\nPC9M9aTsUQfGsNCXMX3HOy3ODyi0HgcKxnnLzmFdmX2x/DUtBTuJkTbeZDZ8\nGdWjYBXgMIAxQyb4YA+MuW0LeWsald/A0sak9o8E8QYtVYAfbAewTzTbts/+\n7nOK3OaEs9iwnnEl8mEo1qqsohHpoq7oGoHIRQ7ylNnun3ArAl0hjGCsknZ/\nDPNo\r\n=CUWN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICh1bg1+Vr24IysDTb+c4ZeM/niVGCAxS+O5TaSyiD4oAiAyNLM2/vLo7OjQ39FC6PKMYyYA394cdKPVLQwxwulymQ=="}]},"maintainers":[{"email":"adam@hathcock.co.uk","name":"adamhathcock"},{"email":"wildfiction@gmail.com","name":"guyellis"},{"email":"admin@rwky.net","name":"rwky"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-google-oauth2_1.0.0_1547747110259_0.6284440886967393"},"_hasShrinkwrap":false}},"time":{"created":"2018-06-29T21:07:33.650Z","0.2.0":"2018-06-29T21:07:33.850Z","modified":"2024-02-08T11:23:57.757Z","0.3.0":"2018-11-03T21:16:10.458Z","1.0.0-beta.0":"2019-01-17T12:22:22.888Z","1.0.0-beta.1":"2019-01-17T16:09:08.406Z","1.0.0":"2019-01-17T17:45:10.397Z"},"maintainers":[{"email":"rowan@qwertee.com","name":"rwkyqwertee"},{"email":"brettz9@yahoo.com","name":"brettz9"},{"email":"adam@hathcock.co.uk","name":"adamhathcock"},{"email":"wildfiction@gmail.com","name":"guyellis"}],"description":"Google (OAuth 2.0) authentication strategy for Passport.","homepage":"https://github.com/passport-next/passport-google-oauth2#readme","keywords":["passport","google","auth","authn","authentication","identity"],"repository":{"type":"git","url":"git+https://github.com/passport-next/passport-google-oauth2.git"},"author":{"name":"Rowan Wookey","email":"admin@rwky.net"},"bugs":{"url":"http://github.com/passport-next/passport-google-oauth2/issues"},"license":"MIT","readme":"# Passport strategy for Google OAuth 2.0\n\n[![NPM version](https://img.shields.io/npm/v/@passport-next/passport-google-oauth2.svg)](https://www.npmjs.com/package/@passport-next/passport-google-oauth2)\n[![Build Status](https://travis-ci.org/passport-next/passport-google-oauth2.svg?branch=master)](https://travis-ci.org/passport-next/passport-google-oauth2)\n[![Coverage Status](https://coveralls.io/repos/github/passport-next/passport-google-oauth2/badge.svg?branch=master)](https://coveralls.io/github/passport-next/passport-google-oauth2?branch=master)\n[![Maintainability](https://api.codeclimate.com/v1/badges/7c817d8118420a47390a/maintainability)](https://codeclimate.com/github/passport-next/passport-google-oauth2/maintainability)\n[![Dependencies](https://david-dm.org/passport-next/passport-google-oauth2.png)](https://david-dm.org/passport-next/passport-google-oauth2)\n<!--[![SAST](https://gitlab.com/passport-next/passport-google-oauth2/badges/master/build.svg)](https://gitlab.com/passport-next/passport-google-oauth2/badges/master/build.svg)-->\n\n## Install\n\n```bash\n$ npm install @passport-next/passport-google-oauth2\n```\n\n## Usage\n\n#### Create an Application\n\nBefore using `@passport-next/passport-google-oauth2`, you must register an application with\nGoogle.  If you have not already done so, a new project can be created in the\n[Google Developers Console](https://console.developers.google.com/).\nYour application will be issued a client ID and client secret, which need to be\nprovided to the strategy.  You will also need to configure a redirect URI which\nmatches the route in your application.\n\n#### Configure Strategy\n\nThe Google authentication strategy authenticates users using a Google 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\nGoogle profile.  The `verify` callback must call `cb` providing a user to\ncomplete authentication.\n\n```javascript\nvar GoogleStrategy = require('@passport-next/passport-google-oauth2').Strategy;\n\npassport.use(new GoogleStrategy({\n    clientID: GOOGLE_CLIENT_ID,\n    clientSecret: GOOGLE_CLIENT_SECRET,\n    callbackURL: \"http://www.example.com/auth/google/callback\"\n  },\n  function(accessToken, refreshToken, profile, cb) {\n    User.findOrCreate({ googleId: profile.id }, function (err, user) {\n      return cb(err, user);\n    });\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```javascript\napp.get('/auth/google',\n  passport.authenticate('google', { scope: ['profile'] }));\n\napp.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-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 Google\nuse OAuth 2.0, the code is similar.  Simply replace references to Facebook with\ncorresponding references to Google.\n","readmeFilename":"README.md"}