{"_id":"passport-google-one-tap","_rev":"3-5095f15e9320303858585bb11723320e","name":"passport-google-one-tap","dist-tags":{"beta":"1.0.0-beta0","latest":"1.0.1"},"versions":{"1.0.0-beta0":{"name":"passport-google-one-tap","version":"1.0.0-beta0","description":"Google One Tap authentication strategy for Passport.","main":"lib/index.js","typings":"lib/index.d.ts","scripts":{"build":"tsc","clean":"rimraf lib","lint":"eslint . --ext .js,.jsx,.ts,.tsx","prepublishOnly":"npm run qa && npm run clean && npm run build","qa":"npm run lint","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Genially/passport-google-one-tap.git"},"keywords":["passport","auth","authn","authentication","identity","google","one tap"],"author":{"name":"Genially","email":"support@genial.ly","url":"http://genial.ly/"},"license":"MIT","bugs":{"url":"https://github.com/Genially/passport-google-one-tap/issues"},"homepage":"https://github.com/Genially/passport-google-one-tap#readme","devDependencies":{"@types/express":"^4.17.13","@types/passport":"^1.0.7","@types/passport-strategy":"^0.2.35","@typescript-eslint/eslint-plugin":"^5.4.0","@typescript-eslint/parser":"^5.4.0","eslint":"^8.2.0","eslint-config-prettier":"^8.3.0","prettier":"^2.4.1","rimraf":"^3.0.2","typescript":"^4.4.4"},"dependencies":{"google-auth-library":"^7.0.0","passport-strategy":"^1.0.0"},"engines":{"node":">=12"},"gitHead":"6cd6e9a0a0b8972fa6dc53d28a66fd4711dfd0e0","_id":"passport-google-one-tap@1.0.0-beta0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-fejIS9Wl623fv9Vu3vV8QNsY7n11PtUIl/ZvmgLSoNJAZAXac8qoik8Zgq2nEyMDyP5d5ibMkx9HBCPBE+pMGw==","shasum":"32312e9db7db73ba0285dd126795df80a3762f24","tarball":"https://registry.npmjs.org/passport-google-one-tap/-/passport-google-one-tap-1.0.0-beta0.tgz","fileCount":6,"unpackedSize":16722,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhl2O9CRA9TVsSAnZWagAAaBgP/1GeGrpLQzFeRpDf7dsO\nWf6tSVQnMZxErTNCGhnzl0kTQgZRlr2i1tFIFxF5CLV9mleWWXuqYSGCFWbZ\ne2WII4ESEM5EphH9xnur8rHL/2qsAxmoBkXFz3iRAkIg9ViO+s5BBUrX3fIZ\nyEjS9zWGq5BkxLg1HylS3pabgyqnOUTpMDXjSH76r/HS/1D7m9KmW50Wir+/\nhMc1K/P3In3HijjYqqDyU9oIyaGVZv7wgNKNSABxI6j5oDQ6iDlQse1IWtxv\n+AkHpKmdQSaEz98IeI+waQxUNQfujungCn5MBZX4cz4SFzqPldRzOV9oYF2s\niEg/X9USKLL04sMTZZJ76AmLl3UvZsJFqRY0emuN19MGN7HKG7HzmQUuS7st\nXAMFo8KfZ0Q6qO4JZc0JCJdJe+wblqpqpIgvIdPqowKfDyzLai5Z+idjkriv\n0l2MsmkJ6ESz3CuqCzGY7aTYmfKNl+mM9+lvYtOXA/WqpXuAAPXK1IjoDJ0a\nD0razzf/SmPSUXmEHX2E0Vb/E5aicMltTT3lLmrf2nnXrt6eI7PEcYH0MgQK\nDZBhpIISPKhYFm+Cb1KRm5xGgbQrhAp1esnBetX+s6TsYtfMkEHz2ZL41GNa\nhVYHpnul4d8pt71kji3VJT21/dCvGcLwB+gI4PHMTF5uS0R/LsVM/stjrEFT\naQYJ\r\n=TsFu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID2xN04b9t0xIoWaiGN2FTWohWisDt6BaygYXcYSL/DhAiBlEHFaK5Zq96p1M+h2jzIfLkG3ejTTI9Aa096v/oFt9Q=="}]},"_npmUser":{"name":"geniallyteam","email":"chema@genial.ly"},"directories":{},"maintainers":[{"name":"geniallyteam","email":"chema@genial.ly"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-google-one-tap_1.0.0-beta0_1637311421007_0.6298531789409434"},"_hasShrinkwrap":false},"1.0.0":{"name":"passport-google-one-tap","version":"1.0.0","description":"Google One Tap authentication strategy for Passport.","main":"lib/index.js","typings":"lib/index.d.ts","scripts":{"build":"tsc","clean":"rimraf lib coverage .nyc_output","coverage":"TS_NODE_PROJECT=tsconfig.test.json nyc --reporter=lcov --reporter=text --reporter=cobertura mocha -r ts-node/register 'test/**/*.test.ts'","lint":"eslint . --ext .js,.jsx,.ts,.tsx","prepublishOnly":"npm run qa && npm run clean && npm run build","qa":"npm run lint && npm run test","pretest":"tsc -p tsconfig.test.json","test":"TS_NODE_PROJECT=tsconfig.test.json mocha -r ts-node/register 'test/**/*.test.ts'"},"repository":{"type":"git","url":"git+https://github.com/Genially/passport-google-one-tap.git"},"keywords":["passport","auth","authn","authentication","identity","google","one tap"],"author":{"name":"Genially","email":"support@genial.ly","url":"http://genial.ly/"},"license":"MIT","bugs":{"url":"https://github.com/Genially/passport-google-one-tap/issues"},"homepage":"https://github.com/Genially/passport-google-one-tap#readme","devDependencies":{"@types/chai":"^4.2.22","@types/express":"^4.17.13","@types/mocha":"^9.0.0","@types/passport":"^1.0.7","@types/passport-strategy":"^0.2.35","@typescript-eslint/eslint-plugin":"^5.4.0","@typescript-eslint/parser":"^5.4.0","chai":"^4.3.4","chai-passport-strategy":"^3.0.0","eslint":"^8.2.0","eslint-config-prettier":"^8.3.0","mocha":"^9.1.3","nyc":"^15.1.0","prettier":"^2.4.1","rimraf":"^3.0.2","ts-node":"^10.4.0","typescript":"^4.5.2"},"dependencies":{"google-auth-library":"^7.0.0","passport-strategy":"^1.0.0"},"engines":{"node":">=12"},"gitHead":"4acb0b249c2aefb9e3c4dbba9cc841943bc42036","_id":"passport-google-one-tap@1.0.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-bNrt3elpApyLo/EpuSCI46rHCMRJUwTtjvjfslmPcmmwrHsgwF2GxdA1OW4mEWkvn/rYvBoRw5go7gq12+VDLg==","shasum":"257e6a6615e46e391993aed73e84d268f131a7b5","tarball":"https://registry.npmjs.org/passport-google-one-tap/-/passport-google-one-tap-1.0.0.tgz","fileCount":7,"unpackedSize":19132,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhm+L6CRA9TVsSAnZWagAAYhIP/A1h/HoFFTmB9APB/IMj\noAoKcVzxZrKYkLCHCOFf+01fQr3VLgRJXOTm4jLtADwbT0fut6gVaLEmfEgS\nTDmrDgpI7xWYMeLUXEwF58lbCpMOuNzxa+0m07i4gm4Sy63kpveuVkQMKPJ9\n6NL3btf9Xn4zf+32VSs5RI8IExmjqAFnHmop304A7lqkO2yFP44GU6l9yeV4\nzDorcntc/ExiH54LxaK8X+u80fib2NK9AHxp++2WGP7Z6Tbffe/1Eb7aKe8O\nf4dbqV0CaHgTNBhNvwx50mgRMcRrzzk/RU/bk/4gfPJnQHfaSiGnfPjgwgjS\n4LO3pFaTSwTLs/38uUqRk7HQYLKkBreeXRkq+kaQ61J4G9iRQvUBvpKYX3w3\nUDWjfaxi30fj5IfAIWc7kZKxYwrDvb8Z8iU/MKqCvOmIV3XSvx1sDpWQk7Dk\nJ8Xf3cJp9B8o53kb5megFe42qLMDUXRrLojfqBm/W2//FEIgUuEnP/ehIerf\nACZOYcVXN5f4EESPzWOlbGxVX51k4K5TgcvlGZLChER81rekq3HbJzbHqMV5\nMkmYDjTGv1bHWFEKoa555lL/OE38oITaV96kmIUvdkk5aRpxu2ylbqmW+61H\nwRwET4Z+VOlP7Jkjt3DNOm0X+FTORvkVawsH3N8w+MEEqNYqqD0GZfv4YlGS\nTmOp\r\n=Dq1Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYPwfoZITGRY9FAcecj/Vj8/ZyfNaNi9FicnR/OE83xwIhAPRrbaye4aQdoy473HCjST0QIJo1EPI2oReaT7CVot8+"}]},"_npmUser":{"name":"geniallyteam","email":"chema@genial.ly"},"directories":{},"maintainers":[{"name":"geniallyteam","email":"chema@genial.ly"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-google-one-tap_1.0.0_1637606138373_0.0849541307241517"},"_hasShrinkwrap":false},"1.0.1":{"name":"passport-google-one-tap","version":"1.0.1","description":"Google One Tap authentication strategy for Passport.","main":"lib/index.js","typings":"lib/index.d.ts","scripts":{"build":"tsc","clean":"rimraf lib coverage .nyc_output","coverage":"TS_NODE_PROJECT=tsconfig.test.json nyc --reporter=lcov --reporter=text --reporter=cobertura mocha -r ts-node/register 'test/**/*.test.ts'","lint":"eslint . --ext .js,.jsx,.ts,.tsx","prepublishOnly":"npm run qa && npm run clean && npm run build","qa":"npm run lint && npm run test","pretest":"tsc -p tsconfig.test.json","test":"TS_NODE_PROJECT=tsconfig.test.json mocha -r ts-node/register 'test/**/*.test.ts'"},"repository":{"type":"git","url":"git+https://github.com/Genially/passport-google-one-tap.git"},"keywords":["passport","auth","authn","authentication","identity","google","one tap"],"author":{"name":"Genially","email":"support@genial.ly","url":"http://genial.ly/"},"license":"MIT","bugs":{"url":"https://github.com/Genially/passport-google-one-tap/issues"},"homepage":"https://github.com/Genially/passport-google-one-tap#readme","devDependencies":{"@types/chai":"^4.2.22","@types/express":"^4.17.13","@types/mocha":"^9.0.0","@types/passport":"^1.0.7","@types/passport-strategy":"^0.2.35","@typescript-eslint/eslint-plugin":"^5.4.0","@typescript-eslint/parser":"^5.4.0","chai":"^4.3.4","chai-passport-strategy":"^3.0.0","eslint":"^8.2.0","eslint-config-prettier":"^8.3.0","mocha":"^9.1.3","nyc":"^15.1.0","prettier":"^2.4.1","rimraf":"^3.0.2","ts-node":"^10.4.0","typescript":"^4.5.2"},"dependencies":{"google-auth-library":"^7.0.0","passport-strategy":"^1.0.0"},"engines":{"node":">=12"},"gitHead":"d71b302177ad718c053eeacac0aa6c9aa43e149d","_id":"passport-google-one-tap@1.0.1","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-fAnCtzDd+ZmYzhW9abITZvzb4snGCU0vNyLdNAFZlYD4rWfNkBfV3TyJKYo7I5w81rzjHxmnnGY0jB4T9GSTMg==","shasum":"47d0ddf7408a32ed0abc725afa078c833d3faecb","tarball":"https://registry.npmjs.org/passport-google-one-tap/-/passport-google-one-tap-1.0.1.tgz","fileCount":7,"unpackedSize":19194,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqYM3m7UOs85I81yItPKwYvhVYEZReZ2DafF9/eNVksQIhAICb/iMSPzqTeIGFFvxslhwbG+4fz5SE+LiMj0Vw9S+U"}]},"_npmUser":{"name":"geniallyteam","email":"chema@genial.ly"},"directories":{},"maintainers":[{"name":"geniallyteam","email":"chema@genial.ly"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-google-one-tap_1.0.1_1686124961886_0.6799395977643095"},"_hasShrinkwrap":false}},"time":{"created":"2021-11-19T08:43:41.006Z","1.0.0-beta0":"2021-11-19T08:43:41.159Z","modified":"2023-06-07T08:02:42.140Z","1.0.0":"2021-11-22T18:35:38.522Z","1.0.1":"2023-06-07T08:02:42.039Z"},"maintainers":[{"name":"geniallyteam","email":"chema@genial.ly"}],"description":"Google One Tap authentication strategy for Passport.","homepage":"https://github.com/Genially/passport-google-one-tap#readme","keywords":["passport","auth","authn","authentication","identity","google","one tap"],"repository":{"type":"git","url":"git+https://github.com/Genially/passport-google-one-tap.git"},"author":{"name":"Genially","email":"support@genial.ly","url":"http://genial.ly/"},"bugs":{"url":"https://github.com/Genially/passport-google-one-tap/issues"},"license":"MIT","readme":"# passport-google-one-tap\n\n[Passport](http://passportjs.org/) strategy for authenticating with\n[Google One Tap](https://developers.google.com/identity/one-tap).\n\nThis module lets you authenticate using Google One Tap in your Node.js applications.\nBy plugging into Passport, Google One Tap 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[![npm](https://img.shields.io/npm/v/passport-google-one-tap.svg)](https://www.npmjs.com/package/passport-google-one-tap)\n[![MIT license](https://img.shields.io/npm/l/diod)](./LICENSE)\n[![Build status](https://github.com/Genially/passport-google-one-tap/actions/workflows/qa.yml/badge.svg)](https://github.com/Genially/passport-google-one-tap/actions)\n[![codecov](https://codecov.io/gh/Genially/passport-google-one-tap/branch/main/graph/badge.svg?token=fOgYwD6XoD)](https://codecov.io/gh/Genially/passport-google-one-tap)\n\n## Install\n\n```bash\nnpm install passport-google-one-tap\n```\n\n## Usage\n\n### Create an Application\n\nBefore using `passport-google-one-tap`, 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.\n\n### Configure client side\n\nThe client side configuration is not covered by this plugin, you can follow\nthe official [Google One Tap Guidelines](https://developers.google.com/identity/gsi/web/guides/display-google-one-tap).\n\nThe client ID used in the front-end must be the same used in\nthe strategy configuration and the login uri must be the same that you will configure\nin the [Authenticate Requests](#authenticate-requests) section.\n\nMinimal example:\n\n```html\n<script src=\"https://accounts.google.com/gsi/client\" async defer></script>\n<div\n  id=\"g_id_onload\"\n  data-client_id=\"YOUR_GOOGLE_CLIENT_ID\"\n  data-login_uri=\"https://your.domain/auth/one-tap/callback\"\n></div>\n```\n\n### Configure Strategy\n\nThe Google One Tap authentication strategy verifies the\nGoogle ID token on your server side and retrieves the user information.\nThe 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 `profile` with the authenticated user's\nGoogle profile. The `verify` callback must call `done` providing a user to\ncomplete authentication.\n\n```javascript\nvar GoogleOneTapStrategy =\n  require(\"passport-google-one-tap\").GoogleOneTapStrategy;\n\npassport.use(\n  new GoogleOneTapStrategy(\n    {\n      clientID: GOOGLE_CLIENT_ID, // your google client ID\n      clientSecret: GOOGLE_CLIENT_SECRET, // your google client secret\n      verifyCsrfToken: false, // whether to validate the csrf token or not\n    },\n    function (profile, done) {\n      // Here your app code, for example:\n      User.findOrCreate({ googleId: profile.id }, function (err, user) {\n        return done(err, user);\n      });\n    }\n  )\n);\n```\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'google-one-tap'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n```javascript\napp.use(express.urlencoded({ extended: true }));\n\napp.post(\n  \"/auth/one-tap/callback\",\n  passport.authenticate(\n    \"google-one-tap\",\n    { failureRedirect: \"/login\" },\n    (err, user) => {\n      // Do whatever you need\n    }\n  ),\n  function (req, res) {\n    // Successful authentication, redirect home.\n    res.redirect(\"/\");\n  }\n);\n```\n\n## Examples\n\nDevelopers using the popular [Express](http://expressjs.com/) web framework can\nrefer to an [example](https://github.com/Genially/passport-google-one-tap/tree/main/example#readme)\nas a starting point for their own web applications.\n\n## License\n\npassport-google-one-tap is released under the MIT license:\n\nMIT License\n\nCopyright (c) 2021 Genially Web S.L.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","readmeFilename":"README.md"}