{"_id":"@8baselabs/auth0-utils","_rev":"3-5fc01aecf036c44d95e1a37b4df611a2","name":"@8baselabs/auth0-utils","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@8baselabs/auth0-utils","version":"0.0.1","description":"This is package to deal with common scenarios working with auth0 platform","main":"lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"jest --collect-coverage --passWithNoTests","build":"tsc","format":"prettier --write \"src/**/*.ts\" \"src/**/*.js\"","lint":"eslint --fix"},"repository":{"type":"git","url":"git+https://github.com/8base-services/auth0-utils.git"},"keywords":["8base","auth0","utils"],"author":{"name":"8baselabs"},"license":"ISC","bugs":{"url":"https://github.com/8base-services/auth0-utils.git/issues"},"homepage":"https://github.com/8base-services/auth0-utils.git#readme","husky":{"hooks":{"pre-commit":"npx lint-staged","pre-push:":"npm test"}},"lint-staged":{"*.{js,ts}":["prettier --write","eslint --fix"]},"dependencies":{"@types/node-fetch":"^2.5.10","nanoid":"^3.1.22","node-fetch":"^2.6.6"},"peerDependencies":{"node-fetch":"^2.6.6"},"devDependencies":{"@babel/core":"^7.13.16","@babel/preset-env":"^7.13.15","@babel/preset-typescript":"^7.13.0","@types/jest":"^26.0.22","@types/node":"^14.14.41","@typescript-eslint/eslint-plugin":"^4.22.0","@typescript-eslint/parser":"^4.22.0","babel-jest":"^26.6.3","eslint":"^7.24.0","eslint-config-prettier":"^8.2.0","eslint-plugin-jest":"^24.3.5","eslint-plugin-jsdoc":"^32.3.0","husky":"^6.0.0","jest":"^26.6.3","lint-staged":"^10.5.4","prettier":"^2.2.1","ts-jest":"^26.5.5","typescript":"^4.2.4"},"directories":{"example":"example"},"gitHead":"6695f04e0e9b2d7c4cef6cf682236f35bbbec24c","_id":"@8baselabs/auth0-utils@0.0.1","_nodeVersion":"14.18.3","_npmVersion":"8.5.0","dist":{"integrity":"sha512-E0J8EpwPxzXqDPvVZiQC+c9mseGTmF39nP9CQFjQmvfQBks7bpivTWv7WlHAOjeaidNJI4yyLp4SnSKC8JV4pw==","shasum":"755aa215dd0ab12e2e2bb46c068589f37e371d2b","tarball":"https://registry.npmjs.org/@8baselabs/auth0-utils/-/auth0-utils-0.0.1.tgz","fileCount":2,"unpackedSize":3479,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhzbJl6bJFPFwketRNFo1eSb+Q2EHw+NlV49dfaZFvQwIgS4LcQiDYJf0gQFG3BTDyauptxggjtdr8rNdbn8lKAPs="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRdTkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmodpBAAk+fxI2NNi0aKWpmzso+PFqv9M+bkUETroJtZ3edpu9lla2ZH\r\nMKtVUK0R4iBouOZPZQ3ZsnsnfkZ2nBFFSBTG8Hjlz2AEK3Dss2BpfXV8hdWK\r\n/ej8g54Lco4N+d5/zYbIMDYqoffYaE3WrvVdkl3qdR7feivVGB1eIneMfHkL\r\nlSeoWQdHQe8UoP/R3w39CDm+6Zj89jIoyYW1dm7x6LfXIWThFHX2R+yUbEK1\r\nh4vb9RrGk9/iaEmmOHU0kg9kgwTR92sJmQHL76MsJL7B2t02KfHlzstclQgy\r\nae1YwaPGfBlijyy7ZC9Mpwao3EiWBrbC5kzHmXORtYICwn4tDLDe8IlSSJ8O\r\nMHrx7w1SVIg2l8QbAdZofReOw2CFP/nKytvqhfA/irnDkpzgtRPBxI69O564\r\nUng8n7LMLZM6Xp17IW0/ixtw8+nqcbNbmZJiGM4hgbSaV7127xxE/BbWoDW+\r\niXIVyE1adnCstYHopUybIqmbV5x/Ti+DQke2djaQz5YOMHaCnMxa2HH7zRVY\r\nyeI52DMPJkYPkbFPB0Uy9QwtOyGrgWDbGdqNwkGdBpz26z84GSVSMu8Rw3Cc\r\nWJGTUkH1iWkhQFMC+X95TKGyRFxug3mYk9V9WKPZr6mvd7tiHzvJryISVPSX\r\nmYg4Ewdga9wt4iUKF/YA1++L+6qVhGjEK+I=\r\n=Blrs\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"8baselabsadmin","email":"8baselabsadmin@8baselabs.com"},"maintainers":[{"name":"8baselabsadmin","email":"8baselabsadmin@8baselabs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/auth0-utils_0.0.1_1648743652232_0.20630508429164807"},"_hasShrinkwrap":false},"0.0.2":{"name":"@8baselabs/auth0-utils","version":"0.0.2","description":"This is package to deal with common scenarios working with auth0 platform","main":"lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"jest --collect-coverage --passWithNoTests","build":"tsc","format":"prettier --write \"src/**/*.ts\" \"src/**/*.js\"","lint":"eslint --fix"},"repository":{"type":"git","url":"git+https://github.com/8base-services/auth0-utils.git"},"keywords":["8base","auth0","utils"],"author":{"name":"8baselabs"},"license":"ISC","bugs":{"url":"https://github.com/8base-services/auth0-utils.git/issues"},"homepage":"https://github.com/8base-services/auth0-utils.git#readme","husky":{"hooks":{"pre-commit":"npx lint-staged","pre-push:":"npm test"}},"lint-staged":{"*.{js,ts}":["prettier --write","eslint --fix"]},"dependencies":{"@types/node-fetch":"^2.5.10","nanoid":"^3.1.22","node-fetch":"^2.6.6"},"peerDependencies":{"node-fetch":"^2.6.6"},"devDependencies":{"@babel/core":"^7.13.16","@babel/preset-env":"^7.13.15","@babel/preset-typescript":"^7.13.0","@types/jest":"^26.0.22","@types/node":"^14.14.41","@typescript-eslint/eslint-plugin":"^4.22.0","@typescript-eslint/parser":"^4.22.0","babel-jest":"^26.6.3","eslint":"^7.24.0","eslint-config-prettier":"^8.2.0","eslint-plugin-jest":"^24.3.5","eslint-plugin-jsdoc":"^32.3.0","husky":"^6.0.0","jest":"^26.6.3","lint-staged":"^10.5.4","prettier":"^2.2.1","ts-jest":"^26.5.5","typescript":"^4.2.4"},"directories":{"example":"example"},"gitHead":"6695f04e0e9b2d7c4cef6cf682236f35bbbec24c","_id":"@8baselabs/auth0-utils@0.0.2","_nodeVersion":"14.18.3","_npmVersion":"8.5.0","dist":{"integrity":"sha512-VpTakkVbRS437fqh1QIqwKWDzS3axJr1OuKdEjZ7LQo99dJ5WJbdf2gaAyF5C4cD/zY1RuzIEmSCkR8gorqugw==","shasum":"bf86d95ffc1451522231ff5b890d30542da47138","tarball":"https://registry.npmjs.org/@8baselabs/auth0-utils/-/auth0-utils-0.0.2.tgz","fileCount":10,"unpackedSize":59016,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICtUaA8LoQE5HcfayJjq54TsvIvCtpYYCa3vh+Y0EsxhAiBDvppfboN15q75NCKRiK/v5Q8KTFvPg5gQCtaCnuRGpA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRghrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqT3Q//QwUzqydDYQp68SrI6E0jDISxP4oFUfo4Ec7TXXhE8i0Dw1Kf\r\nT1h8fRlFk2TkOdflGllTRoACN1L9cb27oRcvoutxEwLISTKEwuInAfQsl0to\r\nz6IasQ3wMYg/15LicnKCKxhpsee89vxBtwE6NC9If/Ty3qBZMeJB0eTAAfGJ\r\n9JufKthDswGIR9NqyKtafYd1JSUukMQIYFZ3MsVm6NIA4ZbboQSKzvps/3UO\r\nrd2NzSZrIZDP++DyRfROIXVx0KgGuh1P0OvRDKly4BQfNXdPRyNk5JjjlS/T\r\njB8oxg3nAG3F8dHbQ0n1BPr8aV39i1V8L9r0VVEUifoD55pJ/QSoDzQvxO9t\r\nk/YlX9Rbrk2L/c82L0SyqbJal2MkUQ2vcMs+N1Je1luKEcE3wJJQCMUFqL/w\r\nf1+HYvLRXLc61CExEJDjdnQ/OFQj6mWp7UK5vZG1RQBu1qt2vd3keE8rVnKf\r\n2C/4dyHqRbBWroanAVoLBj/MuP3NM6348oOZ/Xo6Ajs3x/jr7ZLlTY3gbvnQ\r\nJt07pMge+tBjyfzamEiBgPl3+Us0a+BSSYqIIPUQNyXCGFsm9Trj9emKuaaq\r\nxYmly/D3rPOpDhLZ7yVTzVKtLfDk5pDUoMVWN+od2NeHZrCKTSr3teFZTtns\r\nrkDhnYtrW+9eMaRx4TZhirD1vyrohyRu/4o=\r\n=/2R6\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"8baselabsadmin","email":"8baselabsadmin@8baselabs.com"},"maintainers":[{"name":"8baselabsadmin","email":"8baselabsadmin@8baselabs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/auth0-utils_0.0.2_1648756842975_0.7725330637416026"},"_hasShrinkwrap":false}},"time":{"created":"2022-03-31T16:20:52.188Z","0.0.1":"2022-03-31T16:20:52.396Z","modified":"2023-02-06T11:21:36.958Z","0.0.2":"2022-03-31T20:00:43.145Z"},"maintainers":[{"email":"marcelo.garciaprieto@8baselabs.com","name":"magarciaprieto"},{"email":"ariel.deagustini@8baselabs.com","name":"ariel.deagustini.8baselabs"},{"email":"8baselabsadmin@8baselabs.com","name":"8baselabsadmin"}],"description":"This is package to deal with common scenarios working with auth0 platform","homepage":"https://github.com/8base-services/auth0-utils.git#readme","keywords":["8base","auth0","utils"],"repository":{"type":"git","url":"git+https://github.com/8base-services/auth0-utils.git"},"author":{"name":"8baselabs"},"bugs":{"url":"https://github.com/8base-services/auth0-utils.git/issues"},"license":"ISC","readme":"# 8base-auth0\n\nThis is package to deal with common scenarios working with auth0 platform\n\n## Installation\n\n1. Run on your terminal the following command:\n\n```sh\n$ npm i --save @8baselabs/auth0-utils\n```\n\n## Auth0Client\n\nThis client help us to interact with auth0 API\n\nFirst initialize the client with the `createAuth0Client` function\n\n```ts\nimport { createAuth0Client } from '@8baselabs/auth0-utils';\n\nconst auth0Client = createAuth0Client({\n  domain: 'your-app.us.auth0.com', // your domain\n  clientId: 'BK6GTXnA87cdr56JXStB4TErQv70X546ff', // your auth0 app client id\n  clientSecret: '********************', // your auth0 app client secret\n});\n```\n\nThen you can use any of the methods\n\n```ts\n// Creates a user with their email and database connection to save it\nconst auth0User = auth0Client.createAuth0User(\n  'test@test.com',\n  'Username-Password-Authentication',\n);\n```\n\n```ts\n// Retrives a user by their email\nconst auth0User = auth0Client.getUserByEmail('test-user@test-mail.com');\n```\n\n```ts\n// Deletes a user by its auth0 id\nconst auth0User = auth0Client.deleteUser('auth0|C61704df6c69eb200705238e5');\n```\n\n## Contribute to this package\n\nYou can contribute to this project cloning this repository then install\n\n```sh\n$ npm install\n```\n\nIn the `example` directory inside this project there is a small node js app that imports this library\nYou can use the example app to test you features and fixes during the development process\n\n1. First make the build with `npm run build` at the root to build de package.\n2. Then you can `npm run build && node lib/index.js` to build and execute the node script to test the package.\n","readmeFilename":"README.md"}