{"_id":"@denz93/vendure-plugin-3rd-party-auth","_rev":"2-6c7e462e09586cd249e90c26423dbe9d","name":"@denz93/vendure-plugin-3rd-party-auth","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@denz93/vendure-plugin-3rd-party-auth","version":"0.0.1","description":"A set of auth strategies to work with 3rd party such as Google, Facebook, etc","main":"index.js","author":{"name":"Nhan Bach","email":"inbox@nhanbach.dev"},"license":"MIT","private":false,"keywords":["vendure","plugin","third-party-auth","authentication","oauth2","google","facebook"],"types":"dist/index.d.ts","scripts":{"lint":"eslint","test":"vitest run","test:watch":"vitest --coverage","test:debug":"vitest run --test-timeout 300000","test:coverage":"vitest run --coverage && make-coverage-badge","build":"rm -rf ./dist && tsc"},"devDependencies":{"@nestjs/common":"^7","@nestjs/core":"^7","@nestjs/platform-express":"^7","@types/express":"^4.17.17","@typescript-eslint/eslint-plugin":"^5.57.0","@typescript-eslint/parser":"^5.57.0","@vendure/common":"^1.9.5","@vendure/core":"^1.9.5","@vendure/testing":"^1.9.5","@vitest/coverage-istanbul":"^0.29.7","dotenv":"^16.0.3","eslint":"^8.36.0","express":"^4.18.2","express-handlebars":"^7.0.4","make-coverage-badge":"^1.2.0","sql.js":"^1.8.0","typescript":"^4.9.5","vitest":"^0.29.7"},"dependencies":{"@nestjs/axios":"^2.0.0","axios":"^1.3.4","google-auth-library":"^8.7.0","graphql-tag":"^2.12.6"},"licenseText":"MIT License\n\nCopyright (c) 2023 denz93\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","_id":"@denz93/vendure-plugin-3rd-party-auth@0.0.1","dist":{"shasum":"3f87cfd93775303689f6ae94e513c402fc818a5e","integrity":"sha512-Js0OW9f+ez79ZBYToqeooHSAl4K2kZwb1UXVlBqY2Qm7wsyYch4WDu1K2bYZyxH4VlBSN+QgLCn1HmZoYZWu5w==","tarball":"https://registry.npmjs.org/@denz93/vendure-plugin-3rd-party-auth/-/vendure-plugin-3rd-party-auth-0.0.1.tgz","fileCount":14,"unpackedSize":23608,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDLsDstZ8MrwWWyWdVxo4VT6RJGunjkfoRu5IKVuu4E2AiEA118BPPtpm67GxfKQ6cSMJiKk9c7NIS6UEy26IMD+oz4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKfamACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq0cw/+IN5dOi8rNhaBUgBHLhBOy36ROnaiNRSJ4CSLSZELtahtsVg2\r\nQESkvrmCz+UpfszdAsR3UaQ8dgy0a0JCyKvKeDjjcoCV/FrGSHnspVdCRZgx\r\nXcVS9SE8i7IfdSeQBerjGzuxbbIPL71QW1phnIoI4AEYysiOaOis4DjGZucX\r\nKt+Z7HsKoM0TXo5F3FJ5rkfT1Uw/8h+QA+XL2S6bJA//KW2nUm8xVweabhag\r\n9RG7OrFt5aA4w1jigttd2wb/ZcJmz35yqJmO6JE3s1E2fUJyNn8Lp46Hko0E\r\n2x8Pq3SAxrLDwIBc7XrR25m2J60a6kzMU1vN7TvNoONCUQX5qjojm4Hi/613\r\nSHzuXiWxNQsmVzZIsi7MEYkPjQf9i/RFIQxnyFEBSTgazX4lGvw/l3bAiiEe\r\nJmh/F1AnkPL5J0IGdAPvnIR3P7S2bYHErXo2Vi0T18k+kI6uimEoay19WZQA\r\nEJ6zdbKkU/+ym1Rt2IohAeDQjl03GVnboQUPpqzvC9L8UBABwaBwEoYzcOvE\r\n7nTSrDcFCY8dyyOQB+0GUpGZra62ordvlNfyzpK7dizfe79bqaU2WAEvERBp\r\nx59BV12gC1fPZoqCdE7lDGq3wRw+o+OKW/D0x8/JiJOQcD2gjcXP4FkERwDq\r\nPiQ6vy1PMipL8dyZfTD6cZP/2ZemjXEu4ms=\r\n=WUIE\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"denz93","email":"bdnhan182@gmail.com"},"directories":{},"maintainers":[{"name":"denz93","email":"bdnhan182@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vendure-plugin-3rd-party-auth_0.0.1_1680471718210_0.4873517781479546"},"_hasShrinkwrap":false},"0.0.2":{"name":"@denz93/vendure-plugin-3rd-party-auth","version":"0.0.2","description":"A set of auth strategies to work with 3rd party such as Google, Facebook, etc","main":"index.js","author":{"name":"Nhan Bach","email":"inbox@nhanbach.dev"},"license":"MIT","private":false,"keywords":["vendure","plugin","third-party-auth","authentication","oauth2","google","facebook"],"types":"dist/index.d.ts","scripts":{"lint":"eslint","test":"vitest run","test:watch":"vitest --coverage","test:debug":"vitest run --test-timeout 300000","test:coverage":"vitest run --coverage && make-coverage-badge","build":"rm -rf ./dist && tsc"},"devDependencies":{"@nestjs/common":"^7","@nestjs/core":"^7","@nestjs/platform-express":"^7","@types/express":"^4.17.17","@typescript-eslint/eslint-plugin":"^5.57.0","@typescript-eslint/parser":"^5.57.0","@vendure/common":"^1.9.5","@vendure/core":"^1.9.5","@vendure/testing":"^1.9.5","@vitest/coverage-istanbul":"^0.29.7","dotenv":"^16.0.3","eslint":"^8.36.0","express":"^4.18.2","express-handlebars":"^7.0.4","make-coverage-badge":"^1.2.0","sql.js":"^1.8.0","typescript":"^4.9.5","vitest":"^0.29.7"},"dependencies":{"@nestjs/axios":"^2.0.0","axios":"^1.3.4","google-auth-library":"^8.7.0","graphql-tag":"^2.12.6"},"licenseText":"MIT License\n\nCopyright (c) 2023 denz93\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","_id":"@denz93/vendure-plugin-3rd-party-auth@0.0.2","dist":{"shasum":"8af1c33faf7ee857c558168d66cb4f0ca928e20a","integrity":"sha512-Vo3OeOX+59t4RunM/ruphs+wDFoPxMmPvuyuf6y/KsGNqbsbjUwV8EH8/IsNrB/+ZWP3kJIr+LaVFoeOLylVoA==","tarball":"https://registry.npmjs.org/@denz93/vendure-plugin-3rd-party-auth/-/vendure-plugin-3rd-party-auth-0.0.2.tgz","fileCount":14,"unpackedSize":23608,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6OB4eE0OGHyJyfzpe5+kkdC+zFRTDLhOi/G45YUlirwIhAJ2wc/y+Qp0I4U7OxKRmiDa5U9memPMZE0QKvGysc90Q"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKfyVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo9yA//VHfvw6MXdf+tDLdd5A+jYQLSbiZK3/rxuOSETrfoTeDGmRM+\r\nR8Nau0Nxg3MVfbRPlunnSrTxHn8WShglKOQ3D1L6MICmw3y1ChaQ+wOuKIX0\r\nnvkk9TJE2M8vY4jNJRDgHFgFiR7yz+pEE+mbcBT/1mztDq0rUbDz3uhMuRk9\r\nIrS70F54V9MknEyYabaS5RMusqCq7x2FbM16OA1Qhn07oblAevSRrWUjVb/U\r\nn2P0Imw+MP6Skj7+4wYF5jftBwDJlsQkEhpl+RHngaf3JtIsWHgS0z/fZ87a\r\ntBbUZgrMHj9JZ6O8poXT2WSjvPERUpfeJ1xT4RjykF7+zX/1mOvma8e091xe\r\nMJVB+DIk35ZpTMemkyLAmTBcF0IzxX5+6vdk+FBjD5pCF+QJHm62SnCBr/XO\r\n8J2xP0JA+YPquBLLehgsNXv47FdNfVK9bb3IubG6C4/QljkbWKBm4Hw+/ucs\r\nEZWj4crtwdn8RAXewcMkiZjO5XmjAoIHSot7uayKXseSDkDHZGnUfARsWQdy\r\nzwzdZAjP8lzMVuWY6WYgWSoFBYzMYpoAqbWhnhTLzoanuFBsYmsz9Ss5gHXJ\r\nOuneJLiuw5aU6b++oJPEVJxoytKuXL5mCz14j2BpfXhVNZEJoQygAMA79q99\r\nzuugB71Yr3pxibZXRzPTXuBHKpsLO1gyg3U=\r\n=nkm5\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"denz93","email":"bdnhan182@gmail.com"},"directories":{},"maintainers":[{"name":"denz93","email":"bdnhan182@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vendure-plugin-3rd-party-auth_0.0.2_1680473237157_0.3745004324323924"},"_hasShrinkwrap":false},"0.0.3":{"name":"@denz93/vendure-plugin-3rd-party-auth","version":"0.0.3","description":"A set of auth strategies to work with 3rd party such as Google, Facebook, etc","main":"dist/index.js","author":{"name":"Nhan Bach","email":"inbox@nhanbach.dev"},"license":"MIT","private":false,"keywords":["vendure","plugin","third-party-auth","authentication","oauth2","google","facebook"],"types":"dist/index.d.ts","scripts":{"lint":"eslint","test":"vitest run","test:watch":"vitest --coverage","test:debug":"vitest run --test-timeout 300000","test:coverage":"vitest run --coverage && make-coverage-badge","build":"rm -rf ./dist && tsc"},"devDependencies":{"@nestjs/common":"^7","@nestjs/core":"^7","@nestjs/platform-express":"^7","@types/express":"^4.17.17","@typescript-eslint/eslint-plugin":"^5.57.0","@typescript-eslint/parser":"^5.57.0","@vendure/common":"^1.9.5","@vendure/core":"^1.9.5","@vendure/testing":"^1.9.5","@vitest/coverage-istanbul":"^0.29.7","dotenv":"^16.0.3","eslint":"^8.36.0","express":"^4.18.2","express-handlebars":"^7.0.4","make-coverage-badge":"^1.2.0","sql.js":"^1.8.0","typescript":"^4.9.5","vitest":"^0.29.7"},"dependencies":{"@nestjs/axios":"^2.0.0","axios":"^1.3.4","google-auth-library":"^8.7.0","graphql-tag":"^2.12.6"},"licenseText":"MIT License\n\nCopyright (c) 2023 denz93\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","_id":"@denz93/vendure-plugin-3rd-party-auth@0.0.3","dist":{"shasum":"50e20387569db6fbbe81e9b0ed353dc6764303ae","integrity":"sha512-YlxWJyanERwwxgmgCIR62eKemOJsLinYsqcZtAdcmg7O4s0OkQewSuoTyukB+ZCub7d5bPfiCxNylQw/M4UhDQ==","tarball":"https://registry.npmjs.org/@denz93/vendure-plugin-3rd-party-auth/-/vendure-plugin-3rd-party-auth-0.0.3.tgz","fileCount":23,"unpackedSize":28380,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkR1Ssg0TnMo5TPN7vU6fn8lbdEkUwZNJCqIoOc0ihdAIgbQAMVTD1on13eNc1EYtH1HvV9GyNVIY8+kednN35IYI="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKjjgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo61Q//TbcM43LAkSNzTNB68J88JRM3hZqRGrcVBsmmAq/oe3NRyRSh\r\ne17ac8VvP81oqi+Hrt8Ax/oxM/KAbo8vRmcCGTXopYAK3l76kO8uhY60RXES\r\n1v6Mr3MpSNIEdKaTBjq3Ole+uZoQgaADgpI5GQakpU43hGJ2OIOBlYt+86Wa\r\nxkzbWIjWZW8dBFF7p8vkk/JvNTv0jVSTOw5/Ztm2P8i6F72alMtr5h5ycZLd\r\nRl5LoW+pSXFGJPVFX8q6+OInovzb9yOFnovLDKHHKjFqyQO7fQGhMsryGPF4\r\nVyQm4MWqOfcmHnx7W24ham91Dt+j4XzHLVgt4KllqoVSdY0q8DDcmIKd1vCj\r\n9BspWBQED0pVji2Khgj/QxNehkT3QF+e98sTS/0NFwUtTVVVIvRF0x6z0a0y\r\noqN5Xfv08AdKxhJ0hv5sfJu0Ib6Y8ERVINiz8gUQUvvMIfBPd5XjiBApmk4l\r\nIMKygvyCr7X2DQEnLMlJNPzx5VJZBzgiThcsjquSXhYBAtLVT5dqTlRGesnn\r\nP9kyqT3RK19Fm4jCffVwWI0+9YnxGcBaKyLxgBBexfj9SetTuEOuY+vfGPOO\r\nQOVDaeGTjnoW2wml5SbxFeqYIzWX5a2D9ZWHeoOdq+z3fbAWHeq7SLV3KTCz\r\nZew77aymA4SomckbJjCfHiUsKzt9AZpRAvc=\r\n=J9qr\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"denz93","email":"bdnhan182@gmail.com"},"directories":{},"maintainers":[{"name":"denz93","email":"bdnhan182@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vendure-plugin-3rd-party-auth_0.0.3_1680488672802_0.607942436594576"},"_hasShrinkwrap":false}},"time":{"created":"2023-04-02T21:41:58.160Z","0.0.1":"2023-04-02T21:41:58.434Z","modified":"2023-04-03T02:24:33.030Z","0.0.2":"2023-04-02T22:07:17.296Z","0.0.3":"2023-04-03T02:24:32.927Z"},"maintainers":[{"name":"denz93","email":"bdnhan182@gmail.com"}],"description":"A set of auth strategies to work with 3rd party such as Google, Facebook, etc","keywords":["vendure","plugin","third-party-auth","authentication","oauth2","google","facebook"],"author":{"name":"Nhan Bach","email":"inbox@nhanbach.dev"},"license":"MIT","readme":"# Third-Party Auth Plugin for Vendure.io\n\n[![Test CI](https://github.com/denz93/vendure-plugin-3rd-party-auth/actions/workflows/test.yml/badge.svg)](https://github.com/denz93/vendure-plugin-3rd-party-auth/actions/workflows/test.yml)\n[![Publish Package to npmjs](https://github.com/denz93/vendure-plugin-3rd-party-auth/actions/workflows/publish.yml/badge.svg)](https://github.com/denz93/vendure-plugin-3rd-party-auth/actions/workflows/publish.yml)\n[![Coverage](https://denz93.github.io/vendure-plugin-3rd-party-auth/badge.svg)](https://denz93.github.io/vendure-plugin-3rd-party-auth/)\n\nA Vendure plugin allow users to be authenticated using third-party providers such as Google, Facebook, etc\n\n## Supported Providers\n\n- [x] Google\n- [x] Facebook\n- [] Twitter \n- [] More?\n\n## What is does\n\nExtend GraphQL mutation `authenticate`\n\n## How to use\n\n### 1.Install\n\n`yarn add @denz93/vendure-plugin-3rd-party-auth`\n\nor\n\n`npm i --save @denz93/vendure-plugin-3rd-party-auth`\n\n### 2. Add the plugin to `vendure-config.ts`\n\n``` typescript\nimport { ThirdPartyAuthPlugin } from '@denz93/vendure-plugin-3rd-party-auth'\n...\nexport const config: VendureConfig = {\n    ...\n    plugins: [\n        ...\n        ThirdPartyAuthPlugin.init({\n            google: {\n                clientId: 'xxx',\n                clientSecret: 'xxx'\n            },\n            facebook: {\n                clientId: 'xxx',\n                clientSecret: 'xxx'\n            }\n            ...\n        })\n    ]\n}\n```\n\n### 3. Consume Graphql mutation `authenticate`\n\n```graphql\nmuation authenticate (\n    input: {\n        google: {\n            token: \"ID_TOKEN\" // <== get it from Google 'sign-in' button\n        }\n    } {\n        id\n        identifier\n    }\n)\n```\n\n## Note\n\n1. All strategies will need an \"**id_token**\" to verify and authenticate users to Vendure system.\n\n2. \"**id_token**\" can be retrieved by using provider's front-end libraries. The library will handle the login process and invoke a callback with \"**id_token**\". Your job is to send that token to the plugin through the mutation `authenticate` above.\n\n    > Google: https://developers.google.com/identity/gsi/web/guides/overview\n    \n    > Facebook: https://developers.facebook.com/docs/facebook-login/web/login-button\n\n3. The plugin using email as identitfier, so make sure you request `\"email\"` permission from users.\n","readmeFilename":"README.md"}