{"_id":"passport-google-auth","_rev":"11-fe91276d5f337e627893c3e679190ba8","name":"passport-google-auth","description":"Google (OAuth2) authentication strategy for Passport and Node.js.","dist-tags":{"latest":"1.0.2"},"versions":{"0.0.1":{"name":"passport-google-auth","version":"0.0.1","description":"Google (OAuth2) authentication strategy for Passport and Node.js.","keywords":["passport","google","auth","authn","authentication","identity"],"repository":{"type":"git","url":"git://github.com/RiptideCloud/passport-google-auth.git"},"bugs":{"url":"http://github.com/RiptideCloud/passport-google-auth/issues"},"author":{"name":"David Pate","email":"me@davidtpate.com","url":"http://davidtpate.com"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"index.js","dependencies":{"passport-strategy":"1.x","googleapis":"^1.x","sinon":"^1.10.3"},"devDependencies":{"istanbul":"^0.x","mocha":"^1.x","should":"^4.x","jshint":"^2.x","jscs":"^1.x"},"scripts":{"test":"mocha --check-leaks --bail --reporter spec test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot test/","jshint":"jshint --show-non-errors .","jscs":"jscs .","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec test/ && jshint --show-non-errors . && jscs ."},"homepage":"https://github.com/RiptideCloud/passport-google-auth","_id":"passport-google-auth@0.0.1","dist":{"shasum":"1d5c52df5a21baaea76292682c9e7047b34d025f","tarball":"https://registry.npmjs.org/passport-google-auth/-/passport-google-auth-0.0.1.tgz","integrity":"sha512-BpB0sC+SWO5aNb8bVmx/reak4+K/L7ABixbnS0eqy8mgRMFatk/OC//iho65hKWZBxh1+PIE91iYBEG9ho0fWw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCu3YGdQqeTuPhCDstbOUlPlLtxdtsOlRRa+g/kCPBANQIhAM4/8LtMTLaR+YTBc3TnOIinzsQqW72Z441spwT7esqz"}]},"_from":"./","_npmVersion":"1.4.3","_npmUser":{"name":"davidtpate","email":"me@davidtpate.com"},"maintainers":[{"name":"davidtpate","email":"me@davidtpate.com"}]},"1.0.0":{"name":"passport-google-auth","version":"1.0.0","description":"Google (OAuth2) authentication strategy for Passport and Node.js.","keywords":["passport","google","auth","authn","authentication","identity"],"repository":{"type":"git","url":"git://github.com/RiptideCloud/passport-google-auth.git"},"bugs":{"url":"http://github.com/RiptideCloud/passport-google-auth/issues"},"author":{"name":"David Pate","email":"me@davidtpate.com","url":"http://davidtpate.com"},"contributors":[{"name":"Lovell Fuller","email":"npm@lovell.info","url":"http://lovell.info"}],"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"index.js","dependencies":{"passport-strategy":"1.x","googleapis":"^1.x"},"devDependencies":{"buddy.js":"^0.x","istanbul":"^0.x","mocha":"^2.x","nsp":"^1.x","jscs":"^1.x","jshint":"^2.x","jsinspect":"^0.x","should":"^4.x"},"scripts":{"test":"node ./node_modules/istanbul/lib/cli.js cover node_modules/mocha/bin/_mocha -- --check-leaks  --timeout 60000 --reporter spec test/ && node ./node_modules/jshint/bin/jshint --show-non-errors . && node ./node_modules/jscs/bin/jscs . && node ./node_modules/buddy.js/bin/buddy index.js lib test && node ./node_modules/nsp/bin/nspCLI.js audit-package"},"gitHead":"f4c64a103f5b7ba06074284b2a8496fae572a20f","homepage":"https://github.com/RiptideCloud/passport-google-auth","_id":"passport-google-auth@1.0.0","_shasum":"c7c9231ce8cc646034e27b243d29192d0050d6c8","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.33","_npmUser":{"name":"davidtpate","email":"me@davidtpate.com"},"maintainers":[{"name":"davidtpate","email":"me@davidtpate.com"}],"dist":{"shasum":"c7c9231ce8cc646034e27b243d29192d0050d6c8","tarball":"https://registry.npmjs.org/passport-google-auth/-/passport-google-auth-1.0.0.tgz","integrity":"sha512-AEesgeHstZPWJFzBrTNvosaBLki0gXi8xPZO7lrPVnSPLTJhOkaeFbABg/IgkkD5hHmNYrV8zfNofdpbyB0alA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB9XGzkTEUmXn67pME9TKOABo2SwsFDSyytr+6cjLX5EAiEAqK7e+zgSE7Lcf4C0myjL2fQhAaqjWMLriDSqvj10gGk="}]}},"1.0.1":{"name":"passport-google-auth","version":"1.0.1","description":"Google (OAuth2) authentication strategy for Passport and Node.js.","keywords":["passport","google","auth","authn","authentication","identity"],"license":"MIT","repository":{"type":"git","url":"git://github.com/RiptideCloud/passport-google-auth.git"},"bugs":{"url":"http://github.com/RiptideCloud/passport-google-auth/issues"},"author":{"name":"David Pate","email":"me@davidtpate.com","url":"http://davidtpate.com"},"contributors":[{"name":"Lovell Fuller","email":"npm@lovell.info","url":"http://lovell.info"}],"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"index.js","dependencies":{"passport-strategy":"1.x","googleapis":"^2.x"},"devDependencies":{"buddy.js":"^0.x","istanbul":"^0.x","mocha":"^2.x","nsp":"^2.x","jscs":"^1.x","jshint":"^2.x","jsinspect":"^0.x","should":"^4.x"},"scripts":{"test":"node ./node_modules/istanbul/lib/cli.js cover node_modules/mocha/bin/_mocha -- --check-leaks  --timeout 60000 --reporter spec test/ && node ./node_modules/jshint/bin/jshint --show-non-errors . && node ./node_modules/jscs/bin/jscs . && node ./node_modules/buddy.js/bin/buddy index.js lib test && nsp check"},"gitHead":"f22e17ffa6f147561bb80d5a48bfb218f5b6a2cd","homepage":"https://github.com/RiptideCloud/passport-google-auth#readme","_id":"passport-google-auth@1.0.1","_shasum":"0e4cbdf46e57128a4e6547a9e09206373248b805","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.2.1","_npmUser":{"name":"davidtpate","email":"me@davidtpate.com"},"maintainers":[{"name":"davidtpate","email":"me@davidtpate.com"},{"name":"jhorlin","email":"jhorlin@gmail.com"}],"dist":{"shasum":"0e4cbdf46e57128a4e6547a9e09206373248b805","tarball":"https://registry.npmjs.org/passport-google-auth/-/passport-google-auth-1.0.1.tgz","integrity":"sha512-8VNogWPa7wiNmQCHIP4eyqpHKtcQidJx6ixszVC0ixcdPDaZ+5VI8jSEkTeAmFkjmtAMujo0slp05hOzfREFxw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC+iN3X74360s2/jBQcXAGfg7AD43yU2t9qO701210HWAiEAz9lheNCH8TCeKJhjfDROpt6UHfjSsIFB14GRWCa7Ge0="}]}},"1.0.2":{"name":"passport-google-auth","version":"1.0.2","description":"Google (OAuth2) authentication strategy for Passport and Node.js.","keywords":["passport","google","auth","authn","authentication","identity"],"license":"MIT","repository":{"type":"git","url":"git://github.com/RiptideCloud/passport-google-auth.git"},"bugs":{"url":"http://github.com/RiptideCloud/passport-google-auth/issues"},"author":{"name":"David Pate","email":"me@davidtpate.com","url":"http://davidtpate.com"},"contributors":[{"name":"Lovell Fuller","email":"npm@lovell.info","url":"http://lovell.info"}],"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"index.js","dependencies":{"passport-strategy":"1.x","googleapis":"^16.0.0"},"devDependencies":{"buddy.js":"^0.x","istanbul":"^0.4.5","mocha":"^3.1.0","nsp":"^2.x","jscs":"^3.0.3","jshint":"^2.9.3","jsinspect":"^0.x","should":"^11.0.0"},"scripts":{"test":"node ./node_modules/istanbul/lib/cli.js cover node_modules/mocha/bin/_mocha -- --check-leaks  --timeout 60000 --reporter spec test/ && node ./node_modules/jshint/bin/jshint --show-non-errors . && node ./node_modules/jscs/bin/jscs . && node ./node_modules/buddy.js/bin/buddy index.js lib test && nsp check","shrink":"rm -rf node_modules && npm cache clean && npm i --production && npm shrinkwrap && npm i"},"gitHead":"d16ddb4aad50e55abc2f03ea2ce95f0d1e134c2d","homepage":"https://github.com/RiptideCloud/passport-google-auth#readme","_id":"passport-google-auth@1.0.2","_shasum":"8b300b5aa442ef433de1d832ed3112877d0b2938","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.0","_npmUser":{"name":"ahoran3","email":"a.horan3@gmail.com"},"dist":{"shasum":"8b300b5aa442ef433de1d832ed3112877d0b2938","tarball":"https://registry.npmjs.org/passport-google-auth/-/passport-google-auth-1.0.2.tgz","integrity":"sha512-cfAqna6jZLyMEwUdd4PIwAh2mQKQVEDAaRIaom1pG6h4x4Gwjllf/Jflt3TkR1Sen5Rkvr3l7kSXCWE1EKkh8g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGMXD3H7Wi0i6DTtwDIy27KtN1RXzxp7ieJOa7Rejz9iAiBOsNTQ1t3yz1EE7vTbx5tYOaXQd9MjMJvgBmK1YkKZuQ=="}]},"maintainers":[{"name":"ahoran3","email":"a.horan3@gmail.com"},{"name":"davidtpate","email":"davidtpate@gmail.com"},{"name":"jhorlin","email":"jhorlin@gmail.com"},{"name":"tylerdixon","email":"tylerd1242@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/passport-google-auth-1.0.2.tgz_1495036998938_0.7570045660249889"}}},"readme":"# Passport-Google-Auth\n[![npm](https://img.shields.io/npm/v/passport-google-auth.svg)](https://www.npmjs.com/package/passport-google-auth)\n[![Downloads](https://img.shields.io/npm/dm/passport-google-auth.svg)](https://www.npmjs.com/package/passport-google-auth)\n[![Build Status](https://travis-ci.org/RiptideCloud/passport-google-auth.svg?branch=master)](https://travis-ci.org/RiptideCloud/passport-google-auth)\n[![Coverage Status](https://img.shields.io/coveralls/RiptideCloud/passport-google-auth.svg?branch=master)](https://coveralls.io/r/RiptideCloud/passport-google-auth)\n[![Codacy](https://www.codacy.com/project/badge/d30a71223ecc45878ccfd94e04276414)](https://www.codacy.com/public/davidtpate/passport-google-auth)\n[![Code Climate](https://codeclimate.com/github/RiptideCloud/passport-google-auth/badges/gpa.svg)](https://codeclimate.com/github/RiptideCloud/passport-google-auth)\n[![David](https://img.shields.io/david/RiptideCloud/passport-google-auth.svg)](https://david-dm.org/RiptideCloud/passport-google-auth)\n[![David](https://img.shields.io/david/dev/RiptideCloud/passport-google-auth.svg)](https://david-dm.org/RiptideCloud/passport-google-auth)\n[![David](https://img.shields.io/david/peer/RiptideCloud/passport-google-auth.svg)](https://david-dm.org/RiptideCloud/passport-google-auth)\n\n[Passport](http://passportjs.org/) strategies for authenticating with [Google](http://www.google.com/)\nusing OAuth 2.0.\n\n**Lead Maintainer**: [David Pate](https://github.com/DavidTPate)\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```bash\nnpm install passport-google-auth\n```\n\n## Usage\n\n### Configure Strategy\n\nThe Google authentication strategy authenticates users using a Google\naccount and OAuth 2.0 tokens.  The strategy requires a `verify` callback, which\naccepts these credentials and calls `done` providing a user, as well as\n`options` specifying a client ID, client secret, and callback URL.\n\n```js\nvar passport = require('passport'),\n    GoogleStrategy = require('passport-google-auth').Strategy;\n\npassport.use(new GoogleOAuth2Strategy({\n    clientId: '123-456-789',\n    clientSecret: 'shhh-its-a-secret',\n    callbackURL: 'https://www.example.com/auth/example/callback'\n  },\n  function(accessToken, refreshToken, profile, done) {\n    User.findOrCreate(..., function (err, user) {\n      done(err, user);\n    });\n  }\n));\n```\n\nIf the `passReqToCallback` options is passed and it is true, then the `verify` callback signature\nwill look like the following instead.\n\n```js\nvar passport = require('passport'),\n    GoogleStrategy = require('passport-google-auth').Strategy;\n\npassport.use(new GoogleOAuth2Strategy({\n    clientId: '123-456-789',\n    clientSecret: 'shhh-its-a-secret',\n    callbackURL: 'https://www.example.com/auth/example/callback'\n  },\n  function(req, accessToken, refreshToken, profile, done) {\n    User.findOrCreate(..., function (err, user) {\n      done(err, user);\n    });\n  }\n));\n```\n\n#### Options\nThe `Strategy` can be configured with the following options.\n\n* `clientId`          `String` identifies the client to the service provider **Required**\n* `clientSecret`      `String` secret used to establish ownershup of the client identifier **Required**\n* `callbackURL`       `String` URL to which the service provider will redirect the user after obtaining authorization. **Required**\n* `accessType`        `String` Type of access to be requested from the service provider. Can be `online` (default) or `offline` (gets refresh_token) _Optional_\n* `scope`             `String` or `Array` representing the permission scopes to request access to. (default: `https://www.googleapis.com/auth/userinfo.email`) _Optional_\n* `skipUserProfile`   `Boolean` If set to false, profile information will be retrieved from Google+. (default: `true`) _Optional_\n* `passReqToCallback` `Boolean` When `true`, `req` is the first argument to the verify callback (default: `false`)\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```js\nvar express = require('express'),\n    app = express();\n\napp.get('/login', passport.authenticate('google'));\n\napp.get('/auth/callback/google', \n    passport.authenticate('google', { failureRedirect: '/login' }),\n    function(req, res) {\n        // Successful authentication, redirect to your app.\n        res.redirect('/');\n    }\n);\n```\n\n## Testing\nThis repository uses [Mocha](http://mochajs.org/) as its test runner. Tests can be run by executing the following command:\n\n```bash\nnpm test\n```\n\nThis will run all tests and report on their success/failure in the console, additionally it will include our [Code Coverage](#code-coverage).\n\n## Code Coverage\nThis repository uses [Istanbul](http://gotwarlost.github.io/istanbul/) as its code coverage tool. Code Coverage will be calculated when executing the following command:\n\n```bash\nnpm test\n```\n\nThis will report the Code Coverage to the console similar to the following:\n\n```bash\n=============================== Coverage summary ===============================\nStatements   : 78.07% ( 356/456 )\nBranches     : 50.23% ( 107/213 )\nFunctions    : 74.77% ( 83/111 )\nLines        : 78.07% ( 356/456 )\n================================================================================\n```\n\nAdditionally, an interactive HTML report will be generated in `./coverage/lcov-report/index.html` which allows browsing the coverage by file.\n\n## Code Style\nThis repository uses [JSHint](https://github.com/jshint/jshint) for static analysis, [JavaScript Code Style](https://github.com/jscs-dev/node-jscs)\nfor validating code style, [JSInspect](https://github.com/danielstjules/jsinspect) to detect code duplication, [Buddy.js](https://github.com/danielstjules/buddy.js)\nto detect the use of [Magic Numbers](http://en.wikipedia.org/wiki/Magic_number_(programming)), and\n[Node Security Project](https://github.com/nodesecurity/nsp) for detecting potential security threats with our dependencies. Code inspections are run as part of\nstandard testing, to re-evaluate them simply run:\n\n```bash\nnpm test\n```\n\n## License\n\n[MIT](LICENSE)\n\n## Copyright\n> Copyright (c) 2014 Riptide Software Inc.\n","maintainers":[{"name":"ahoran3","email":"a.horan3@gmail.com"},{"name":"davidtpate","email":"davidtpate@gmail.com"},{"name":"jhorlin","email":"jhorlin@gmail.com"},{"name":"tylerdixon","email":"tylerd1242@gmail.com"}],"time":{"modified":"2022-06-23T12:40:33.546Z","created":"2014-10-07T13:36:01.476Z","0.0.1":"2014-10-07T13:36:01.476Z","1.0.0":"2015-01-23T15:36:30.253Z","1.0.1":"2016-01-27T21:00:26.438Z","1.0.2":"2017-05-17T16:03:20.680Z"},"homepage":"https://github.com/RiptideCloud/passport-google-auth#readme","keywords":["passport","google","auth","authn","authentication","identity"],"repository":{"type":"git","url":"git://github.com/RiptideCloud/passport-google-auth.git"},"author":{"name":"David Pate","email":"me@davidtpate.com","url":"http://davidtpate.com"},"bugs":{"url":"http://github.com/RiptideCloud/passport-google-auth/issues"},"readmeFilename":"README.md","contributors":[{"name":"Lovell Fuller","email":"npm@lovell.info","url":"http://lovell.info"}],"license":"MIT"}