{"_id":"@cognite-ornellas/react-auth-wrapper","_rev":"4-cb77f5ea9fb608991e09d53d3ce24e7c","name":"@cognite-ornellas/react-auth-wrapper","dist-tags":{"latest":"0.0.3"},"versions":{"1.0.0":{"name":"@cognite-ornellas/react-auth-wrapper","version":"1.0.0","description":"A wrapper for cognite api authentication in react","author":{"name":"rodrigo.ornellas@cognite.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/cognitedata/react-auth-wrapper.git"},"main":"dist/index.js","module":"dist/index.modern.js","source":"src/index.tsx","engines":{"node":">=10"},"scripts":{"build":"microbundle-crl --no-compress --format modern,cjs","start":"microbundle-crl watch --no-compress --format modern,cjs","prepare":"run-s build","test":"run-s test:unit test:lint test:build","test:build":"run-s build","test:lint":"eslint .","test:unit":"cross-env CI=1 react-scripts test --env=jsdom","test:watch":"react-scripts test --env=jsdom","predeploy":"cd example && yarn install && yarn run build","deploy":"gh-pages -d example/build"},"dependencies":{"oidc-client-ts":"^2.0.5","react-oidc-context":"^2.1.1"},"peerDependencies":{"react":"^18.2.0","oidc-client-ts":"^2.0.5","react-oidc-context":"^2.1.1"},"devDependencies":{"@testing-library/jest-dom":"^4.2.4","@testing-library/react":"^13.3.0","@testing-library/user-event":"^7.2.1","@types/jest":"^25.1.4","@types/node":"^12.12.38","@types/react":"^18.0.15","@types/react-dom":"^18.0.6","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","microbundle-crl":"^0.13.10","babel-eslint":"^10.0.3","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.7.0","eslint-config-standard":"^14.1.0","eslint-config-standard-react":"^9.2.0","eslint-plugin-import":"^2.18.2","eslint-plugin-node":"^11.0.0","eslint-plugin-prettier":"^3.1.1","eslint-plugin-promise":"^4.2.1","eslint-plugin-react":"^7.17.0","eslint-plugin-standard":"^4.0.1","gh-pages":"^2.2.0","npm-run-all":"^4.1.5","prettier":"^2.0.4","react":"^18.2.0","react-dom":"^18.2.0","react-scripts":"^5.0.1","typescript":"^3.7.5"},"bugs":{"url":"https://github.com/cognitedata/react-auth-wrapper/issues"},"homepage":"https://github.com/cognitedata/react-auth-wrapper#readme","directories":{"example":"example"},"keywords":["auth-wrapper","cognite","react","typescript"],"gitHead":"e0787fa16ebb640d6f6f88ef4656206c80950594","_id":"@cognite-ornellas/react-auth-wrapper@1.0.0","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-4qBlHT15SiwJrTlw0aYGpN9qj/e9JzSJO7sej8RfSnHArP+Z5QxwqxD793w4hXJGu3chFRhAPH3l4aZXVFTO/A==","shasum":"1f3659d1e759ba234a882fdbaed821e5d833e721","tarball":"https://registry.npmjs.org/@cognite-ornellas/react-auth-wrapper/-/react-auth-wrapper-1.0.0.tgz","fileCount":20,"unpackedSize":28618,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBFm3IpRe40UAQXypJt6P7dv/9tj/YTn2KFYdMhjQeEsAiEA/wudZiAOuTebUAeooAfIJRE7a/ewFEucsv4pkskGybo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6oBsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpR2g/+ImHk3tQPU2p0kxiGVq92fhh1pzipupbmgRtyXWnTEc37Qk9A\r\nBivnNBY6CRhzpKfvjlMlhN1kC1SsZEw7v5HB/9Q9Q+0r6TRReflBbqmdiqdN\r\n+PnwVA8QynwID+4YmpFUfhSvoB8LfgzuupGScx+8GNpNMmjjqvhmpQ/pIOUA\r\nkU9vO3CKGqabmX1vOZBTbspy9e4VPzdU7yAjb6uwUbxULfIVkhlYMt/EWK3W\r\nXyvOfILMp1f8oSwI2THFX7j5GbwpRqZM/yk7bGAmCHsuLTgBhFL2sl8aBxUH\r\n6zHZfdNM5MFplwSAKBUmL260Vgeh4BTLLQRwaoR+j0GRpXR1u9QKYsYO8Uny\r\nLM+Le/DC738Wk8fBwugtPu+Zasy67QidKxeEIwEWIKJYY8LneH31gcvY4DQd\r\nz1McQCCJMRBt7s1tb6tOgjcn20+N+UzECfdZO+eUlHKh5uwqPH38tegJIDHj\r\n11Kro+jL3ESstYS7ZVjEoHMOjCW/aqPc7m5j/aq/7XAZOiCGSolCCY8NxZ6J\r\nc86orp0w7MEV4+AwVRu+QABIcKr2h6Vz8bAQi/Wsa83VdQwszxfTs9yy0i+S\r\nPvSdG00mx3EaIfwd/YMQ+ei7C8Wz+XLiDIBY6VXa2EfaGs+riw4uZCGlOZ32\r\nQcJaIHImif9V6ZMtRmrF9/CcVntBRRHZlso=\r\n=Dkl0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"cognite-ornellas","email":"rodrigo.ornellas@cognite.com"},"maintainers":[{"name":"cognite-ornellas","email":"rodrigo.ornellas@cognite.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-auth-wrapper_1.0.0_1659535468321_0.6272589860718785"},"_hasShrinkwrap":false},"1.0.1":{"name":"@cognite-ornellas/react-auth-wrapper","version":"1.0.1","description":"A wrapper for cognite api authentication in react","author":{"name":"rodrigo.ornellas@cognite.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/cognitedata/react-auth-wrapper.git"},"main":"dist/index.js","module":"dist/index.modern.js","source":"src/index.tsx","engines":{"node":">=10"},"scripts":{"build":"microbundle-crl --no-compress --format modern,cjs","start":"microbundle-crl watch --no-compress --format modern,cjs","prepare":"run-s build","test":"run-s test:unit test:lint test:build","test:build":"run-s build","test:lint":"eslint .","test:unit":"cross-env CI=1 react-scripts test --env=jsdom","test:watch":"react-scripts test --env=jsdom","predeploy":"cd example && yarn install && yarn run build","deploy":"gh-pages -d example/build","semantic-release":"semantic-release"},"release":{"branches":["main"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits"}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits"}],"@semantic-release/npm","@semantic-release/github"]},"dependencies":{"oidc-client-ts":"^2.0.5","react-oidc-context":"^2.1.1"},"peerDependencies":{"react":"^18.2.0","oidc-client-ts":"^2.0.5","react-oidc-context":"^2.1.1"},"devDependencies":{"@semantic-release/commit-analyzer":"^9.0.2","@semantic-release/github":"^8.0.4","@semantic-release/npm":"^9.0.1","@semantic-release/release-notes-generator":"^10.0.3","@testing-library/jest-dom":"^4.2.4","@testing-library/react":"^13.3.0","@testing-library/user-event":"^7.2.1","@types/jest":"^25.1.4","@types/node":"^12.12.38","@types/react":"^18.0.15","@types/react-dom":"^18.0.6","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","conventional-changelog-conventionalcommits":"^4.6.3","semantic-release":"^19.0.2","microbundle-crl":"^0.13.10","babel-eslint":"^10.0.3","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.7.0","eslint-config-standard":"^14.1.0","eslint-config-standard-react":"^9.2.0","eslint-plugin-import":"^2.18.2","eslint-plugin-node":"^11.0.0","eslint-plugin-prettier":"^3.1.1","eslint-plugin-promise":"^4.2.1","eslint-plugin-react":"^7.17.0","eslint-plugin-standard":"^4.0.1","gh-pages":"^2.2.0","npm-run-all":"^4.1.5","prettier":"^2.0.4","react":"^18.2.0","react-dom":"^18.2.0","react-scripts":"^5.0.1","typescript":"^3.7.5"},"bugs":{"url":"https://github.com/cognitedata/react-auth-wrapper/issues"},"homepage":"https://github.com/cognitedata/react-auth-wrapper#readme","directories":{"example":"example"},"keywords":["auth-wrapper","cognite","react","typescript"],"gitHead":"419bc68c76efc6a6367be64e4465fbd6e946ff98","_id":"@cognite-ornellas/react-auth-wrapper@1.0.1","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-fGLza7KPqzpXDxihaiK4lDY3n/lR65NegFhBBP9KDSVDCeNPFuICux+mob5tc9RDlnpDC3iQ1EN8Gd4ptoYNvQ==","shasum":"b47c94d573211f81b1fdf628311e5756cf8a16e9","tarball":"https://registry.npmjs.org/@cognite-ornellas/react-auth-wrapper/-/react-auth-wrapper-1.0.1.tgz","fileCount":23,"unpackedSize":45908,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFqJ/4xz2+l6Y5pFTXb/01GRo/xKSghJ7cWF+CkOwwWBAiEApvTfo1YWXmpbrffSro+3QNGt9SxPQMncdG+/gt75VeM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi67tDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrAww//R8Ed9b4pFVhpQCJsG1pRvb6pXu+u8E3yw8U3XJGpIgsQtfGS\r\nrgDwugXceZjv7bFs2kvJ0aqBt7oQia8j3QmPyaEWw3CMcoO7JkjHd7JziV52\r\nXFRgSld1CYL48dzwE1bmT4YZ94Jfn7jY8/YYHOuqB4uU5y1hJX/5D2f8U3rK\r\nEy+yCD/tCRiKrI9v35CunqYU+t81Al39ds/CIRRBiLjfenMifi5tqFEP8wzq\r\nTFnr7e7h0M6ZqNn8R+Sjx1xytI4Bn8H+DFC39vYWbIbX298JkiDdWj1zRCsU\r\nN0KqmmKKHaEx56ZWDan6RQNhPh0jE/1S9BM7RbTVTta6RJazzUirNMcUT6vp\r\nqKCxsRkXWTfo0nM3qFdAHRTPI9BipIVhnTRpfapI5Beuujtx7Wm0wG8uRQIo\r\nrRTnYjnPnrolmr4gIOjNtuhGMQLHNXzKuTa2Z8xQF8tENqOs7tvkE3ggxbfI\r\nrmQ60PmQMudAqYsQlmThJMXddLjH3iAF7eDtnjxKi83kT/Xl4IxpwMzJvbfi\r\nsVT6zuEXrNh3NB5AiZK63JKWDvOKqp+MKKTskh/VARwHjsZR0fSTT5hVzCMf\r\nL9M0YFWAAiIRlvWWwnGQK76TcUUajNc46rzYmq2WfdCsHm91EShhDnzzwN02\r\nNwtEtJAmqkf6X3x0tMBrkybw3n1Hn9MFEa0=\r\n=87tH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"cognite-ornellas","email":"rodrigo.ornellas@cognite.com"},"maintainers":[{"name":"cognite-ornellas","email":"rodrigo.ornellas@cognite.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-auth-wrapper_1.0.1_1659616066953_0.2523992437063374"},"_hasShrinkwrap":false},"0.0.1":{"name":"@cognite-ornellas/react-auth-wrapper","version":"0.0.1","description":"A wrapper for cognite api authentication in react","author":{"name":"rodrigo.ornellas@cognite.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/cognitedata/react-auth-wrapper.git"},"main":"dist/index.js","module":"dist/index.modern.js","source":"src/index.tsx","engines":{"node":">=10"},"scripts":{"build":"microbundle-crl --no-compress --format modern,cjs","start":"microbundle-crl watch --no-compress --format modern,cjs","prepare":"run-s build","predeploy":"cd example && yarn install && yarn run build","deploy":"gh-pages -d example/build","eslint":"eslint --max-warnings 0 --ext .ts '{src,samples}/**/*'","semantic-release":"semantic-release"},"release":{"branches":["main"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits"}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits"}],"@semantic-release/npm","@semantic-release/github"]},"dependencies":{"oidc-client-ts":"^2.0.5","react-oidc-context":"^2.1.1"},"peerDependencies":{"react":"^18.2.0","oidc-client-ts":"^2.0.5","react-oidc-context":"^2.1.1"},"devDependencies":{"@semantic-release/commit-analyzer":"^9.0.2","@semantic-release/github":"^8.0.4","@semantic-release/npm":"^9.0.1","@semantic-release/release-notes-generator":"^10.0.3","@testing-library/jest-dom":"^4.2.4","@testing-library/react":"^13.3.0","@testing-library/user-event":"^7.2.1","@types/jest":"^25.1.4","@types/node":"^12.12.38","@types/react":"^18.0.15","@types/react-dom":"^18.0.6","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","conventional-changelog-conventionalcommits":"^4.6.3","semantic-release":"^19.0.2","microbundle-crl":"^0.13.10","babel-eslint":"^10.0.3","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.7.0","eslint-config-standard":"^14.1.0","eslint-config-standard-react":"^9.2.0","eslint-plugin-import":"^2.18.2","eslint-plugin-node":"^11.0.0","eslint-plugin-prettier":"^3.1.1","eslint-plugin-promise":"^4.2.1","eslint-plugin-react":"^7.17.0","eslint-plugin-standard":"^4.0.1","gh-pages":"^2.2.0","npm-run-all":"^4.1.5","prettier":"^2.0.4","react":"^18.2.0","react-dom":"^18.2.0","react-scripts":"^5.0.1","typescript":"^3.7.5"},"bugs":{"url":"https://github.com/cognitedata/react-auth-wrapper/issues"},"homepage":"https://github.com/cognitedata/react-auth-wrapper#readme","directories":{"example":"example"},"keywords":["auth-wrapper","cognite","react","typescript"],"gitHead":"151625c5fff4fd46ede95093fcf76833608a32f5","_id":"@cognite-ornellas/react-auth-wrapper@0.0.1","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-GB+IWwyHJpJgy3BBDHRYn5dBvmmMXJpHSKWw4veR9Ar7b4C77P5mQCYnSV2Xa+WdbJ4Vyl0/IDwNLeLo7Jry+Q==","shasum":"3303a73d1b4c682ed62afff7f1f45bc9725ba3cf","tarball":"https://registry.npmjs.org/@cognite-ornellas/react-auth-wrapper/-/react-auth-wrapper-0.0.1.tgz","fileCount":23,"unpackedSize":45748,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNf1E/j3TGvdr/5fkE5fRJwNAe4pW7OYdP3ZIE14JHoQIgPpdLBJDm4BxeSfzZHXjNiWcKDcG1nXQG0PcVbFe/0IU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7XAmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrNFQ/+I7RMrrcyp2WFeKUw4zBzimCrl4UvxWCRzGaTtQu+FzcPKvSB\r\nFfzvnHOCiTYK8Psh06z5VGC55yBcj6vg6Bz0VwGwFWLQ/NoUpXTePsNWpXhg\r\nMwyTqBQ/YHEZS3MdLjYOvYUESdsxjt5qkpMBVpc7xm+gw/SRgPYQGkcZadmp\r\nO0YXHzNHrXhkjab2oeiTDOiS04i00jNtMcXZ3YV8NyCaI2wM+fgIWVoaHSzv\r\nMy12ggpCnVOa7osL/e8DVjt0n/7uQxpKXnfp4QmROHWGihyVxNKvfD2ZJOr2\r\nYEPB0IP7rhVNzfmOWrISTAFXIZEevcBmgmghnPy/7iZ3qt621BYr5o1V0ikr\r\no5tm8X5lh7tiPQrnFR9jMsgFzhPGTvVKVgJFYldO7HT503Gh5srf4L0Iw381\r\nnN3lbhAXF/rlXPe8s/pBwO1u+soFIteAPeihnsLgj+a57DOmJXyjsiS3hds5\r\nUq26W7cjf+GuAIE74WKAQ/354cYoX0KmZR0EsEoevPGnl+BN3/GGYhoktEYP\r\nHb12Z/WH4ZMI8g402R7Ehj2UbIq959fOP/HTa4LN70RG2AbUIeWnVb51HKUP\r\nf4z08n5ArbkrQatVQmdBC5N/ahll/cCJvcF5CU1hsXPAdQ6w6VsEXb7nE8Wq\r\nIj8mKqEo4JqyPxToHfyX3jGi7qV5tkNZGRM=\r\n=9Ud+\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"cognite-ornellas","email":"rodrigo.ornellas@cognite.com"},"maintainers":[{"name":"cognite-ornellas","email":"rodrigo.ornellas@cognite.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-auth-wrapper_0.0.1_1659727910282_0.3107628392548698"},"_hasShrinkwrap":false},"0.0.2":{"name":"@cognite-ornellas/react-auth-wrapper","version":"0.0.2","description":"A wrapper for cognite api authentication in react","author":{"name":"rodrigo.ornellas@cognite.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/cognitedata/react-auth-wrapper.git"},"main":"dist/index.js","module":"dist/index.modern.js","source":"src/index.tsx","types":"src/index.d.ts","engines":{"node":">=10"},"scripts":{"build":"microbundle-crl --no-compress --format modern,cjs","start":"microbundle-crl watch --no-compress --format modern,cjs","prepare":"run-s build","predeploy":"cd example && yarn install && yarn run build","deploy":"gh-pages -d example/build","eslint":"eslint --max-warnings 0 --ext .ts '{src,samples}/**/*'","semantic-release":"semantic-release"},"resolutions":{"postcss":"^8.2.10","nth-check":"2.0.1"},"release":{"branches":["main"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits"}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits"}],"@semantic-release/npm","@semantic-release/github"]},"dependencies":{"oidc-client-ts":"^2.0.5","react-oidc-context":"^2.1.1","react-scripts":"^5.0.1"},"peerDependencies":{"oidc-client-ts":"^2.0.5","postcss":"^8.2.10","react":"^18.2.0","react-oidc-context":"^2.1.1"},"devDependencies":{"@semantic-release/commit-analyzer":"^9.0.2","@semantic-release/github":"^8.0.4","@semantic-release/npm":"^9.0.1","@semantic-release/release-notes-generator":"^10.0.3","@svgr/webpack":"^6.2.1","@testing-library/jest-dom":"^4.2.4","@testing-library/react":"^13.3.0","@testing-library/user-event":"^7.2.1","@types/jest":"^25.1.4","@types/node":"^12.12.38","@types/react":"^18.0.15","@types/react-dom":"^18.0.6","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","babel-eslint":"^10.0.3","conventional-changelog-conventionalcommits":"^4.6.3","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.7.0","eslint-config-standard":"^14.1.0","eslint-config-standard-react":"^9.2.0","eslint-plugin-import":"^2.18.2","eslint-plugin-node":"^11.0.0","eslint-plugin-prettier":"^3.1.1","eslint-plugin-promise":"^4.2.1","eslint-plugin-react":"^7.17.0","eslint-plugin-standard":"^4.0.1","gh-pages":"^2.2.0","microbundle-crl":"^0.13.10","npm-run-all":"^4.1.5","postcss":"^8.2.10","prettier":"^2.0.4","react":"^18.2.0","react-dom":"^18.2.0","semantic-release":"^19.0.2","typescript":"^3.7.5"},"bugs":{"url":"https://github.com/cognitedata/react-auth-wrapper/issues"},"homepage":"https://github.com/cognitedata/react-auth-wrapper#readme","directories":{"example":"example"},"keywords":["auth-wrapper","cognite","react","typescript"],"gitHead":"89dac4efd84d847b4fe6e1a63b471775e3ac93ab","_id":"@cognite-ornellas/react-auth-wrapper@0.0.2","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-RxQRzmZXhC8ZofOKZGRGs+qqm2nuP061t7svi/B7D6azpVJpJ5z6LboCNwgB5OzAmaahwTCY6aNPPxHpyXDg8A==","shasum":"b159690832818cf3e75fd5d65304ff3cb946ebd1","tarball":"https://registry.npmjs.org/@cognite-ornellas/react-auth-wrapper/-/react-auth-wrapper-0.0.2.tgz","fileCount":23,"unpackedSize":45393,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE1FxvMDUzN/yljFrWjqESjBReVUMwahT4AsVwFjlCNoAiEAjeYosZlPaflc58yRKmWc0Pmul9Mm4jJKcbImlBoYDXA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7XEcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmphsA/+OeeKRZL1SyaqRHqfVvEAomTEP/HS/oyTRS1/JB2atfL/Jici\r\ngpQcH0qFduK/PBTYiIz9i5RLMnzz+U4VvhndEhn/uLE/vWVQ020ft8mvoTJM\r\nYu1CYeGZn0KsK79HpZNAFCZC1Qci3EY0p7vlvrxtuEObyHKbc1RQHfETyqpQ\r\ndgqWGjp4I68mq5Yi+MCau3WyXg9CStvT5v75vsVeuGmQiwdHYgwBERNlcfjd\r\nxLm95lBwfeucqt3lxBf/eShZhrGxaf4ael/3j+5rBsc2WiCvOrdnDhS5AvpU\r\noUrscm1HuNFyswcYHdaW5ExaHB1xTsDfJ5+8lT6LlNQmFKHJ1q51UpHQ8ymP\r\n14oT6CmeT89nZ9bH4ZZvovDrHBzbbbpew402k4tB+sILrvVlhtK0hi1c+/6X\r\n365ON7+WSpan39XVn+9p1/9RbDPq8E9aeNzIaddnI0nhe6vyV8qtZEvoWPFY\r\nNB0LniXWj1J+JqLQuRBYtmZzKI8h+lfLvQuaQIocQo030lbM6UYY/tDVc+Bu\r\nDh7i6kuTO9deAMBj5K69DDnB16yiB/XaN3O6sfP9YtpsYOi8kUWQCpY5/r44\r\nw388KCwJOxVQbslLL/OUEz9h4rs/Ai6VkWUtzCE7nc81zS/aJNrXsn5jpxMR\r\nUiVs9n50h13V1a/8/vLU2POrlUBZmNjSi6k=\r\n=d/8p\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"cognite-ornellas","email":"rodrigo.ornellas@cognite.com"},"maintainers":[{"name":"cognite-ornellas","email":"rodrigo.ornellas@cognite.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-auth-wrapper_0.0.2_1659728156361_0.7082043555416031"},"_hasShrinkwrap":false},"0.0.3":{"name":"@cognite-ornellas/react-auth-wrapper","version":"0.0.3","description":"A wrapper for cognite api authentication in react","author":{"name":"rodrigo.ornellas@cognite.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/cognitedata/react-auth-wrapper.git"},"main":"dist/index.js","module":"dist/index.modern.js","source":"src/index.tsx","engines":{"node":">=10"},"scripts":{"build":"microbundle-crl --no-compress --format modern,cjs","start":"microbundle-crl watch --no-compress --format modern,cjs","prepare":"run-s build","predeploy":"cd example && yarn install && yarn run build","deploy":"gh-pages -d example/build","eslint":"eslint --max-warnings 0 --ext .ts '{src,samples}/**/*'","semantic-release":"semantic-release"},"resolutions":{"postcss":"^8.2.10","nth-check":"2.0.1"},"release":{"branches":["main"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits"}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits"}],"@semantic-release/npm","@semantic-release/github"]},"dependencies":{"oidc-client-ts":"^2.0.5","react-oidc-context":"^2.1.1","react-scripts":"^5.0.1"},"peerDependencies":{"oidc-client-ts":"^2.0.5","postcss":"^8.2.10","react":"^18.2.0","react-oidc-context":"^2.1.1"},"devDependencies":{"@semantic-release/commit-analyzer":"^9.0.2","@semantic-release/github":"^8.0.4","@semantic-release/npm":"^9.0.1","@semantic-release/release-notes-generator":"^10.0.3","@svgr/webpack":"^6.2.1","@testing-library/jest-dom":"^4.2.4","@testing-library/react":"^13.3.0","@testing-library/user-event":"^7.2.1","@types/jest":"^25.1.4","@types/node":"^12.12.38","@types/react":"^18.0.15","@types/react-dom":"^18.0.6","@typescript-eslint/eslint-plugin":"^2.26.0","@typescript-eslint/parser":"^2.26.0","babel-eslint":"^10.0.3","conventional-changelog-conventionalcommits":"^4.6.3","cross-env":"^7.0.2","eslint":"^6.8.0","eslint-config-prettier":"^6.7.0","eslint-config-standard":"^14.1.0","eslint-config-standard-react":"^9.2.0","eslint-plugin-import":"^2.18.2","eslint-plugin-node":"^11.0.0","eslint-plugin-prettier":"^3.1.1","eslint-plugin-promise":"^4.2.1","eslint-plugin-react":"^7.17.0","eslint-plugin-standard":"^4.0.1","gh-pages":"^2.2.0","microbundle-crl":"^0.13.10","npm-run-all":"^4.1.5","postcss":"^8.2.10","prettier":"^2.0.4","react":"^18.2.0","react-dom":"^18.2.0","semantic-release":"^19.0.2","typescript":"^3.7.5"},"bugs":{"url":"https://github.com/cognitedata/react-auth-wrapper/issues"},"homepage":"https://github.com/cognitedata/react-auth-wrapper#readme","directories":{"example":"example"},"keywords":["auth-wrapper","cognite","react","typescript"],"gitHead":"89dac4efd84d847b4fe6e1a63b471775e3ac93ab","_id":"@cognite-ornellas/react-auth-wrapper@0.0.3","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-+xIH+KEBrS0MjKLEZAjFiXJD1aGh29R/GELa8V8lQHA2tJHjvqLiWoDRshe5r5LnwFMD8kn5MsKhaMiK3Ozbgw==","shasum":"6f3cb6abffa8b6c957c23dac272840f570bba92f","tarball":"https://registry.npmjs.org/@cognite-ornellas/react-auth-wrapper/-/react-auth-wrapper-0.0.3.tgz","fileCount":23,"unpackedSize":45364,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEHHkK71G9Jcnxv1iUMC8aEwVopkOoRdBnyj838MYShjAiB6EgwrUR/wkvCQcM/GldNiA+aOdB1W3ZHyQ9dANw3E0A=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7XY/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoLzQ/+N1E8fjKpcZKC+ACmfPC4u008JHhmZ5ILBpgD68ueOF//vh66\r\nxXimSdc5K8gckZw/FKIGOakLaOQ7f0/59JEwK4hsH55wgfoNYQCzngbvMyUh\r\nA7rYRuPm8QL0cjZzdBe3XNBiwRsbVWopnczbfVXGVyHytQcH6cNLR9SdFPeY\r\nEpC2P35b5n+jpYepZwVYRJtfjXYg92m3q9lEHmYENS4Oi4t+fM+9wIkTNiz8\r\nC9IyZEkfluGhAppftzhZet4tYtA7jjAz/W6UZxB0B6+Sgtw37RR2drlCYthJ\r\n7mhYfsiEkxlsN5DVYscsOwysb+wyJFIdMbBdEayZimwpGQY8649gCRvMIF65\r\nBADTN8k1kRsE95NusHkYc4J2EWKEFOWlExznfZf1W+TvvE+mDDUSga8TgHIX\r\n2iIC7UON+OuWpNvizMK9ZpybaVI2wZbXIIeRGR3L1ExehHOYeB1yJzMnLOmg\r\ngfYcn+d6/PQ+Ni49q8yL/K4FTyxXANorlXDu58am+0cIy5FkMC9mzEv674jk\r\ndnwBPQyduaUX4MUrVxxue4+h1Oy5RU9HAYKPAJqQZUncIwxuELQmEhcuTN1t\r\n6MXBeFPYEeBMeJuFUyyTTvjwbcrU2wfjje8ACRNwNfIhqkLJOMrVC/vlo7qb\r\nRo/eEKFHVqH6XBAtKDc3Uqlf2m6BDh32j5w=\r\n=jHzK\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"cognite-ornellas","email":"rodrigo.ornellas@cognite.com"},"maintainers":[{"name":"cognite-ornellas","email":"rodrigo.ornellas@cognite.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-auth-wrapper_0.0.3_1659729471480_0.12280440853023489"},"_hasShrinkwrap":false}},"time":{"created":"2022-08-03T14:04:28.218Z","1.0.0":"2022-08-03T14:04:28.533Z","modified":"2022-08-05T19:57:51.680Z","1.0.1":"2022-08-04T12:27:47.132Z","0.0.1":"2022-08-05T19:31:50.500Z","0.0.2":"2022-08-05T19:35:56.554Z","0.0.3":"2022-08-05T19:57:51.603Z"},"maintainers":[{"name":"cognite-ornellas","email":"rodrigo.ornellas@cognite.com"}],"description":"A wrapper for cognite api authentication in react","homepage":"https://github.com/cognitedata/react-auth-wrapper#readme","keywords":["auth-wrapper","cognite","react","typescript"],"repository":{"type":"git","url":"git+https://github.com/cognitedata/react-auth-wrapper.git"},"author":{"name":"rodrigo.ornellas@cognite.com"},"bugs":{"url":"https://github.com/cognitedata/react-auth-wrapper/issues"},"license":"MIT","readme":"# react-auth-wrapper\n\n[![Stable Release](https://img.shields.io/npm/v/react-auth-wrapper.svg)](https://npm.im/@cognite/react-auth-wrapper)\n\nLightweight auth library using the\n[react-oidc-context](https://github.com/authts/react-oidc-context) library for React\nsingle page applications (SPA). Support for\n[hooks](https://reactjs.org/docs/hooks-intro.html) and\n[higher-order components (HOC)](https://reactjs.org/docs/higher-order-components.html).\n\n## Table of Contents\n\n- [Documentation](#documentation)\n- [Installation](#installation)\n- [Getting Started](#getting-started)\n- [Contributing](#contributing)\n- [Influences](#influences)\n- [License](#license)\n\n## Documentation\n\nThis library implements an auth context provider by making use of the\n`oidc-client-ts` and `react-oidc-context` libraries. Its configuration is tight coupled to that library.\n\n- [react-oidc-context](https://github.com/authts/react-oidc-context)\n- [oidc-client-ts](https://github.com/authts/oidc-client-ts)\n\nThe\n[`User`](https://authts.github.io/oidc-client-ts/classes/User.html)\nand\n[`UserManager`](https://authts.github.io/oidc-client-ts/classes/UserManager.html)\nis hold in this context, which is accessible from the\nReact application. Additionally it intercepts the auth redirects by looking at\nthe query/fragment parameters and acts accordingly. You still need to setup a\nredirect uri, which must point to your application, but you do not need to\ncreate that route.\n\nTo renew the access token, the\n[automatic silent renew](https://authts.github.io/oidc-client-ts/interfaces/UserManagerSettings.html#automaticSilentRenew)\nfeature of `oidc-client-ts` can be used.\n\n## Installation\n\nUsing [npm](https://npmjs.org/)\n\n```bash\nnpm install @cognite/react-auth-wrapper --save\n```\n\n## Getting Started\n\nConfigure the library by wrapping your application in `ReactCogniteAuthProvider`:\n\n```jsx\n// src/index.jsx\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { ReactCogniteAuthProvider } from \"@cognite/react-auth-wrapper\";\nimport App from \"./App\";\n\nconst oidcConfig = {\n  authority: \"<your authority>\",\n  client_id: \"<your client id>\",\n  redirect_uri: \"<your redirect uri>\",\n  // ...\n};\n\nReactDOM.render(\n  <ReactCogniteAuthProvider {...oidcConfig}>\n    <App />\n  </ReactCogniteAuthProvider>,\n  document.getElementById(\"app\")\n);\n```\n\nUse the `useAuth` hook in your components to access authentication state\n(`isLoading`, `isAuthenticated` and `user`) and authentication methods\n(`signinRedirect`, `removeUser` and `signOutRedirect`):\n\n```jsx\n// src/App.jsx\nimport React from \"react\";\nimport { useCogAuth } from \"@cognite/react-auth-wrapper\";\n\nfunction App() {\n  const auth = useCogAuth();\n\n  switch (auth.activeNavigator) {\n    case \"signinSilent\":\n      return <div>Signing you in...</div>;\n    case \"signoutRedirect\":\n      return <div>Signing you out...</div>;\n  }\n\n  if (auth.isLoading) {\n    return <div>Loading...</div>;\n  }\n\n  if (auth.error) {\n    return <div>Oops... {auth.error.message}</div>;\n  }\n\n  if (auth.isAuthenticated) {\n    return (\n      <div>\n        Hello {auth.user?.profile.sub}{\" \"}\n        <button onClick={() => void auth.removeUser()}>Log out</button>\n      </div>\n    );\n  }\n\n  return <button onClick={() => void auth.signinPopup()}>Log in</button>;\n}\n\nexport default App;\n```\n\nYou **must** provide an implementation of `onSigninCallback` to `oidcConfig` to remove the payload from the URL upon successful login. Otherwise if you refresh the page and the payload is still there, `signinSilent` - which handles renewing your token - won't work.\n\n### Use with a Class Component\n\nUse the `withAuth` higher-order component to add the `auth` property to class\ncomponents:\n\n```jsx\n// src/Profile.jsx\nimport React from \"react\";\nimport { withAuth } from \"react-oidc-wrapper\";\n\nclass Profile extends React.Component {\n  render() {\n    // `this.props.auth` has all the same properties as the `useAuth` hook\n    const auth = this.props.auth;\n    return <div>Hello {auth.user?.profile.sub}</div>;\n  }\n}\n\nexport default withAuth(Profile);\n```\n\n### Call a protected API\n\nAs a child of `AuthProvider` with a user containing an access token:\n\n```jsx\n// src/Posts.jsx\nimport React from \"react\";\nimport { useAuth } from \"@cognite/react-auth-wrapper\";\n\nconst Posts = () => {\n  const auth = useCogAuth();\n  const [posts, setPosts] = useState(null);\n\n  React.useEffect(() => {\n    (async () => {\n      try {\n        const token = auth.user?.access_token;\n        const response = await fetch(\"https://api.example.com/posts\", {\n          headers: {\n            Authorization: `Bearer ${token}`,\n          },\n        });\n        setPosts(await response.json());\n      } catch (e) {\n        console.error(e);\n      }\n    })();\n  }, [auth]);\n\n  if (!posts) {\n    return <div>Loading...</div>;\n  }\n\n  return (\n    <ul>\n      {posts.map((post, index) => {\n        return <li key={index}>{post}</li>;\n      })}\n    </ul>\n  );\n};\n\nexport default Posts;\n```\n\nAs **not** a child of `AuthProvider` (e.g. redux slice) when using local storage\n(`WebStorageStateStore`) for the user containing an access token:\n\n```jsx\n// src/slice.js\nimport { User } from \"oidc-client-ts\";\n\nfunction getUser() {\n  const oidcStorage = localStorage.getItem(\n    `oidc.user:<your authority>:<your client id>`\n  );\n  if (!oidcStorage) {\n    return null;\n  }\n\n  return User.fromStorageString(oidcStorage);\n}\n\nexport const getPosts = createAsyncThunk(\n  \"store/getPosts\",\n  async () => {\n    const user = getUser();\n    const token = user?.access_token;\n    return fetch(\"https://api.example.com/posts\", {\n      headers: {\n        Authorization: `Bearer ${token}`,\n      },\n    });\n  }\n  // ...\n);\n```\n\n### Adding event listeners\n\nThe underlying [`UserManagerEvents`](https://authts.github.io/oidc-client-ts/classes/UserManagerEvents.html) instance can be imperatively managed with the `useAuth` hook.\n\n```jsx\n// src/App.jsx\nimport React from \"react\";\nimport { useCogAuth } from \"@cognite/react-auth-wrapper\";\n\nfunction App() {\n  const auth = useCogAuth();\n\n  React.useEffect(() => {\n    // the `return` is important - addAccessTokenExpiring() returns a cleanup function\n    return auth.events.addAccessTokenExpiring(() => {\n      if (\n        alert(\n          \"You're about to be signed out due to inactivity. Press continue to stay signed in.\"\n        )\n      ) {\n        auth.signinSilent();\n      }\n    });\n  }, [auth.events, auth.signinSilent]);\n\n  return <button onClick={() => void auth.signinRedirect()}>Log in</button>;\n}\n\nexport default App;\n```\n\n## Contributing\n\nWe appreciate feedback and contribution to this repo!\n\n## License\n\nThis project is licensed under the MIT license. See the\n[LICENSE](https://github.com/cognitedata/react-auth-wrapper/blob/main/LICENSE) file\nfor more info.\n","readmeFilename":"README.md"}