{"_id":"@databiz/login","_rev":"4-516b04298284ecb106518fdac69a4272","name":"@databiz/login","dist-tags":{"latest":"2.0.2"},"versions":{"2.0.0":{"name":"@databiz/login","version":"2.0.0","main":"src/components/databiz.login.js","displayName":"databiz-login","config":{"themeColor":"#e74e0f"},"publishConfig":{"access":"public"},"description":"Web Component to simplify authentication using Google oAuth for Databiz group domains.","repository":{"type":"git","url":"git@github.com:bitrockteam/databiz-login.git"},"author":{"name":"Salvatore Laisa","email":"salvatore.laisa@bitrock.it"},"license":"MIT","scripts":{"start":"NODE_ENV=development webpack-dev-server --hot --config ./webpack.demo.js","build":"NODE_ENV=production webpack","demo":"NODE_ENV=production webpack --config ./webpack.demo.js","deploy":"NODE_ENV=production npm run demo && gh-pages -d dist","test:unit":"NODE_ENV=test ava ./test/index.js --verbose","test":"npm run test:unit"},"devDependencies":{"@types/node":"10.12.2","ava":"0.25.0","css-loader":"1.0.1","cypress":"3.1.1","dotenv-webpack":"1.5.7","esm":"3.0.84","favicons-webpack-plugin":"0.0.9","gh-pages":"2.0.1","html-webpack-plugin":"3.2.0","jsdom":"11.11.0","lit-html":"0.12.0","normalize.css":"8.0.0","style-loader":"0.23.1","ts-loader":"5.3.0","ts-node":"7.0.1","typebase.css":"0.5.0","typescript":"3.1.6","typescript-require":"0.2.10","webpack":"4.25.1","webpack-cli":"3.1.2","webpack-dev-server":"3.1.10"},"dependencies":{},"ava":{"require":["esm"]},"licenseText":"MIT License\n\nCopyright (c) 2018 Bitrock\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":"@databiz/login@2.0.0","dist":{"shasum":"f9688ee6b1b2befba88240ee60c0ab925e989a26","integrity":"sha512-3YFAVXH/MMqlDTNfzwVl0VkYRbJCMgPOwTMWDAqm3RAcE+iR9De1A264Q3xbvzGjnJ0pcq+Q2yWFroiLIkz37Q==","tarball":"https://registry.npmjs.org/@databiz/login/-/login-2.0.0.tgz","fileCount":34,"unpackedSize":38278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4tLrCRA9TVsSAnZWagAA3QMQAIvYMaCFWUJDJfW9Q+nn\nP1j5Ep2FQNmcOz1D/5BFJYCKm34m8U8+gXJfsovODmJ1LZ8CTcOgNdSEtitu\nf5nYNFEVYbzgnUYMmAVRdXw+gBwrKqlAEJAi7lUzxFrvw0XcKVp7GbajGZnp\nBno2CgjzQzMsLBUdm50vwlx+rSy3QmExMFuyEeQQZY08lsBZK0uoRVRZU9tC\nWrTa79nrCP6qB2tbCTeKT5JNHhFezvPh8v+cr4+G86SI5Ak/fhl7bo3hOAh2\npoyFpqRxfnlHb0OT1wEh4l4zd5sgpyqbsWSvB31xBAh6Rt46NwyjXezQbPLI\nhPJXQROXPEt6aov/koPwr1y3P02fMd3QhZYMtUeDmeSEa2LvxijXThWv4gc9\nZey9KdWS+WkBT5ePK3A85610rxY9VnZXjvhsdQjMXwCPWbzxZQQSiz6bteJA\nUtsV4pPd1mH/fm6R5dgff+OAZDnt5nKwfrAoFnQb4vm4Odmc1H7OdhPyHJIQ\noHImArAc6n7CHwq4G0K2fV/mJ62+YA2kpVXQkoy3E8AcWgdeCaNmVJA/UQ7g\nbctnWFUueg0rVZXhLBLDRhx5Ai4YFdID+EiIPuCs4dio9n8zDbS9z/ZwxHDh\n1ibSZQ2CVVBm5A7+3c8R+hjR66o3ShE0ocJG2A0yQs6/3OCn4aJIabi/p1X3\n2AWD\r\n=1e42\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA/29YhVFOrCSEbvNyak8MH1xnDKQUnHVqDMUo0M7RkvAiEAnaYfcVuv3grY+W8LsDMjhVOociH0+RZcRLWyHs6GxSA="}]},"maintainers":[{"name":"bitrock-admin","email":"salvatore.laisa@bitrock.it"},{"name":"moebiusmania","email":"moebiusmania@gmail.com"}],"_npmUser":{"name":"moebiusmania","email":"moebiusmania@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/login_2.0.0_1541591787014_0.1521692095937337"},"_hasShrinkwrap":false},"2.0.1":{"name":"@databiz/login","version":"2.0.1","main":"src/components/databiz.login.js","displayName":"databiz-login","config":{"themeColor":"#e74e0f"},"publishConfig":{"access":"public"},"description":"Web Component to simplify authentication using Google oAuth for Databiz group domains.","repository":{"type":"git","url":"git@github.com:bitrockteam/databiz-login.git"},"author":{"name":"Salvatore Laisa","email":"salvatore.laisa@bitrock.it"},"license":"MIT","scripts":{"start":"NODE_ENV=development webpack-dev-server --hot --config ./webpack.demo.js","build":"NODE_ENV=production webpack","demo":"NODE_ENV=production webpack --config ./webpack.demo.js","deploy":"NODE_ENV=production npm run demo && gh-pages -d dist","test:unit":"NODE_ENV=test ava ./test/index.js --verbose","test":"npm run test:unit"},"devDependencies":{"@types/node":"10.12.2","ava":"0.25.0","css-loader":"1.0.1","cypress":"3.1.1","dotenv-webpack":"1.5.7","esm":"3.0.84","favicons-webpack-plugin":"0.0.9","gh-pages":"2.0.1","html-webpack-plugin":"3.2.0","jsdom":"11.11.0","lit-html":"0.12.0","normalize.css":"8.0.0","style-loader":"0.23.1","ts-loader":"5.3.0","ts-node":"7.0.1","typebase.css":"0.5.0","typescript":"3.1.6","typescript-require":"0.2.10","webpack":"4.25.1","webpack-cli":"3.1.2","webpack-dev-server":"3.1.10"},"dependencies":{},"ava":{"require":["esm"]},"licenseText":"MIT License\n\nCopyright (c) 2018 Bitrock\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":"@databiz/login@2.0.1","dist":{"shasum":"fe3732ea35bf35e5661e78a97a992cb1719fbaac","integrity":"sha512-PdNzYmY1ezs0I63q1NQZKKqyVFmZa6F1jDDqX3pCLWMrAjEe7kFy1+pKye4VDLez3BbH7FvlLS3OQYHcJ5FgDQ==","tarball":"https://registry.npmjs.org/@databiz/login/-/login-2.0.1.tgz","fileCount":34,"unpackedSize":38267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4tPfCRA9TVsSAnZWagAAVSUP/jD6FBG4Ir8HhNu7rFB4\nmhchTiceDOVt8ceWHuyv08My0Wz0MC/3bThDIT9HiGB3kgK2TlSdEGbIqjO9\n2j3hSfOXAHhYEUzVUAqTQYyF9Zwa2LD2W+ZPvLmEoQz4ZEhxyMVl0XHa98Hb\nAvbRedd5CeMMMnPfwLN+nEIeA2wAtB9zs45Gm6AiVHvtfVB97XE4Txr5Tr5J\nuiM3tSYrUdgxZ7IgkZp7oux2veAlJH5RtGcMM7TVcee8k8YZUDghqs0wzNkr\nJNfU1XGoBN97TA51aI1frQ1y0azQG5pSKiyjxwEPG4aD1Rr3cJ5s6/QgvFfM\n6np3Hz0ZJxurmWaHEkSWbQdJ1oQnyoEqDX+WCO+ZsXR4Zwc7zBw9xlwMD4S0\n9EIiWK3jtSpVKfwb6YL2SotfmAds7grH6i2cGUrms3Z/GDat3zAUjEuInAW3\nElwibl/9KLXovjYxAKwAyi62Ttf4xoYeDG5s569BQg9XU0zNOVhDuw6Y5Y/+\n/9KU/kVtJ6DQW9eWKGVLYb+wfj1d4z2yYdqjRul93TXZsQuwejPRu7oaugiW\nBjb48yt9p6Cp58Z1cC4Z9c2Bv3O2bClbc2rlZZ40C0ZHkkJe7+sjopSd4urK\nUIoyNs8ETdSb0OLZ/StSHdWkRgrMu6VaJcVWRvUz+sSDPBloI0XDE0GyZqjB\nKGUb\r\n=iXeV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHta7r8LzHH1O/tr6T04kVsQX0KyWbm2hm9wH9PY2ZUgIhAOgseoIiMPL+Le9LsvpquPa8Wa+2oidR46bXuH20gG6R"}]},"maintainers":[{"name":"bitrock-admin","email":"salvatore.laisa@bitrock.it"},{"name":"moebiusmania","email":"moebiusmania@gmail.com"}],"_npmUser":{"name":"moebiusmania","email":"moebiusmania@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/login_2.0.1_1541592030802_0.10697005760349398"},"_hasShrinkwrap":false},"2.0.2":{"name":"@databiz/login","version":"2.0.2","main":"src/components/databiz.login.js","displayName":"databiz-login","config":{"themeColor":"#e74e0f"},"publishConfig":{"access":"public"},"description":"Web Component to simplify authentication using Google oAuth for Databiz group domains.","repository":{"type":"git","url":"git@github.com:bitrockteam/databiz-login.git"},"author":{"name":"Salvatore Laisa","email":"salvatore.laisa@bitrock.it"},"license":"MIT","scripts":{"start":"NODE_ENV=development webpack-dev-server --hot --config ./webpack.demo.js","build":"NODE_ENV=production webpack","demo":"NODE_ENV=production webpack --config ./webpack.demo.js","deploy":"NODE_ENV=production npm run demo && gh-pages -d dist","test:unit":"NODE_ENV=test ava ./test/index.js --verbose","test":"npm run test:unit"},"devDependencies":{"@types/node":"12.0.1","ava":"1.4.1","css-loader":"2.1.1","cypress":"3.2.0","dotenv-webpack":"1.7.0","esm":"3.2.22","favicons-webpack-plugin":"0.0.9","gh-pages":"2.0.1","html-webpack-plugin":"3.2.0","jsdom":"15.1.0","lit-html":"1.0.0","normalize.css":"8.0.1","style-loader":"0.23.1","ts-loader":"6.0.0","ts-node":"8.1.0","typebase.css":"0.5.0","typescript":"3.4.5","typescript-require":"0.2.10","webpack":"4.31.0","webpack-cli":"3.3.2","webpack-dev-server":"3.3.1"},"dependencies":{},"ava":{"require":["esm"]},"licenseText":"MIT License\n\nCopyright (c) 2018 Bitrock\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":"@databiz/login@2.0.2","dist":{"shasum":"40fc4d608c59eb5134df2139a0bcf0d7e17d6377","integrity":"sha512-+W9axYlYhwbCaHAairr6otQt24qoDqZeTDAZpTVE+Zo6uFO22I9rqmDJG0PJE5lWRITUHoojB5qyMqAfFdVeTQ==","tarball":"https://registry.npmjs.org/@databiz/login/-/login-2.0.2.tgz","fileCount":34,"unpackedSize":38316,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2pCdCRA9TVsSAnZWagAAyggQAIEdtiB5wEkpCfbwqMNb\nH21b7AhHKpJtNMiCagUZlu1sljgK2PlDw0Vms4sYmvjAdhb0hgdt6NbldiNp\nSAmtAjebvrO2k5s/2VhJnV8h27zZWlwjO0HOg7cUJjV+/RECdkpySKnZ/urY\nNVPnqW6TqCwm//JBNm3MByiHhOcEa1MT/qus13TDmNRwiwn4GCjE0iv92x/g\nO6bFGoqgyNMCfOzqGjGnlPfRIkAGEOMHdag2m6KsYonLYw1l9NeiBOuj3BC6\nGaCo/e0r817f+2VNSGmki3KqjIvI7dXcKPTkaasGlqRSKQ4iyPZ7l2/ENSsH\nDm6+bcabV3vw9yEhIpgHOKWF06aFE2PLicw5Thk6F/3FAbIGEyMfW5EIL4gu\nvyKv45vLVBy1Plp2QSKCPdf3bWsFHiF3yhBUB/JSp5UulCDrk55QwDcymCsf\nHkhBoSSqTimec8fSHCHjMps+EiWOtf3h91/RTRrU+XqUioVYuQQncwEn8SEz\ntP4cMlGT7fxSYVbsTCeLP9TDC8r+1Y1O741AICq02RBgqNBTJHBeKFdO3w8p\nrNeFcH6cW3lC+NkANTbheZek+amXZrFqXD65emfwj+/tkAvEGBMXMI8WDSMp\nn3YmzKmtrYzKsVCyyYbQVurkM3mkzoyzkvUnnj2DP4mt36diNwJ9LzKaASLE\nZwcT\r\n=yOjg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGjAVbwkFVoHh4AoxZGqiuqDFmyDfqH/8ulRjGW2ggH0AiBnV7wErCPj9XcHGaNNPNjJV0Ph8VDDd8cdB+S7MkSkAg=="}]},"maintainers":[{"name":"bitrock-admin","email":"salvatore.laisa@bitrock.it"},{"name":"moebiusmania","email":"moebiusmania@gmail.com"}],"_npmUser":{"name":"moebiusmania","email":"moebiusmania@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/login_2.0.2_1557827740565_0.29739982133905096"},"_hasShrinkwrap":false}},"time":{"created":"2018-11-07T11:56:26.857Z","2.0.0":"2018-11-07T11:56:27.146Z","modified":"2022-04-05T02:51:34.904Z","2.0.1":"2018-11-07T12:00:30.945Z","2.0.2":"2019-05-14T09:55:40.735Z"},"maintainers":[{"email":"salvatore.laisa@bitrock.it","name":"bitrock-admin"}],"description":"Web Component to simplify authentication using Google oAuth for Databiz group domains.","repository":{"type":"git","url":"git@github.com:bitrockteam/databiz-login.git"},"author":{"name":"Salvatore Laisa","email":"salvatore.laisa@bitrock.it"},"license":"MIT","readme":"# @databiz/login\n\n[![Build Status](https://travis-ci.org/bitrockteam/databiz-login.svg?branch=master)](https://travis-ci.org/bitrockteam/databiz-login)\n\n> Web Component to simplify authentication using Google oAuth for Databiz group domains, it wraps the [Google Sign-in for Websites SDK](https://developers.google.com/identity/sign-in/web/) and expose custom events for its functionalities.\n\n### How to use\n\nInstall the package from NPM registry\n```bash\n$ npm install @databiz/login\n--- or ---\n$ yarn add @databiz/login\n```\n\nIf you want to include the compiled version (no build-step needed), just load the script tag:\n```html\n<script src=\"./node_modules/@databiz/login/component.js\" async defer></script>\n```\n\nOr if you are working with Webpack and ES modules:\n```javascript\nimport '@databiz/login';\n```\n\nthen in your markup add\n\n```html\n<databiz-login\n  client-id=\"YOUR-CLIENT-ID\"\n></databiz-login>\n```\n\nthe `client-id` is a required parameter and you can obtain it from the Google Developer console.\n\nThis will render the Google login button, once clicked a popup will be prompted to user to choose an account and confirm.\n\nTo react to the login attempt the component fires two custom events: `signin-success` and `signin-error`.\n\nA quick example:\n\n```javascript\nconst $login = document.querySelector('databiz-login');\n\n$login.addEventListener('signin-success', \n  evt => console.log(evt.detail));\n\n$login.addEventListener('signin-error', \n  evt => console.log(evt.detail));\n```\n\nThe `signin-success` event will return an object inside the detail with the following data:\n\n* `token`: the token_id returned from Google authentication\n* `profile`: the data exposed by the `googleUser.getBasicProfile()` in the SDK.\n\nTo trigger the logout from the current session you must import the `signOut` method from the main package:\n\n```javascript\nimport { signOut } from '@databiz/login';\n\n// ...some code later...\n\nsignOut().then(() => {\n  // code to execute after the logout is completed\n});\n\n```\n\n### Browser compatibility\nThe component is built following the Custom Elements v1 and EcmaScript 2015 specifications.\n\n| | Chrome | Firefox | Safari | Opera | Edge | IE11 |\n|--|--|--|--|--|--|--|\n| as-is | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |:x:|:x:|\n| CE polyfill | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |\n\n### Available NPM tasks\nStart the demo page in development mode (live reload)\n```bash\n$ yarn start\n```\n\nCreate a static build of the main component in the `root` folder\n```bash\n$ yarn build\n```\n\nCreate a static build of the demo page in the `./dist` folder\n```bash\n$ yarn demo\n```\n\nRun the `demo` action and deploy to GitHub pages \n```bash\n$ yarn deploy\n```\n\n### Local development\nIn order to have a local development environment, you must create a `.env` file in the project root and add your Google application's client id:\n\n```\nCLIENT_ID=123fake123client123id\n```\n\n### License\nDeveloped by Bitrock UI Engineering team, released under the [MIT license](LICENSE).\n","readmeFilename":"README.md"}