{"id":22014572,"url":"https://github.com/cyrusbiotechnology/auth0-authorization","last_synced_at":"2025-06-26T10:32:38.416Z","repository":{"id":33788383,"uuid":"161471750","full_name":"CyrusBiotechnology/auth0-authorization","owner":"CyrusBiotechnology","description":"Auth0 Authorization Extension API client library","archived":false,"fork":false,"pushed_at":"2024-06-20T18:27:23.000Z","size":851,"stargazers_count":0,"open_issues_count":6,"forks_count":5,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-06-12T12:53:50.511Z","etag":null,"topics":["auth0","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CyrusBiotechnology.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-12-12T10:28:37.000Z","updated_at":"2022-10-19T20:30:34.000Z","dependencies_parsed_at":"2025-05-07T00:39:48.239Z","dependency_job_id":null,"html_url":"https://github.com/CyrusBiotechnology/auth0-authorization","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CyrusBiotechnology/auth0-authorization","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyrusBiotechnology%2Fauth0-authorization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyrusBiotechnology%2Fauth0-authorization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyrusBiotechnology%2Fauth0-authorization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyrusBiotechnology%2Fauth0-authorization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CyrusBiotechnology","download_url":"https://codeload.github.com/CyrusBiotechnology/auth0-authorization/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyrusBiotechnology%2Fauth0-authorization/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262048311,"owners_count":23250518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auth0","typescript"],"created_at":"2024-11-30T04:15:29.334Z","updated_at":"2025-06-26T10:32:38.396Z","avatar_url":"https://github.com/CyrusBiotechnology.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# auth0-authorization\n\nAuth0 Authorization Extension API client library\n\n## Installation\n\n```bash\n  npm install @cyrusbio/auth0-authorization\n```\n\n## AuthorizationClient\n\nUse this client to access the [Auth0 Authorization Extension API](https://auth0.com/docs/api/authorization-extension).\n\n```ts\nimport { AuthorizationClient } from '@cyrusbio/auth0-authorization';\n\nconst authorization = new AuthorizationClient({\n  clientId: `${CLIENT_ID}`,\n  clientSecret: `${CLIENT_SECRET}`,\n  domain: `${TENANT}.auth0.com`,\n  extensionUrl: `https://${TENANT}.us.webtask.io/xxx/api`,\n});\n```\n\nBehind the scenes the client obtains an access token, caches it, and automatically refreshes it if it expires.\n\nEach method returns a promise.\n\n```ts\nconst groups = await authorization.getGroups();\n```\n\n## Types\n\n[TypeScript](https://www.typescriptlang.org) types are included.\n\n```ts\nimport { IAuth0AuthorizationApiGroup } from '@cyrusbio/auth0-authorization';\n\nlet group: IAuth0AuthorizationApiGroup;\n```\n\n\n\n## Testing\n\nAll tests run against a live Auth0 tenant instance.\n\n### Configuration\n\nFirst you need to set up a `.env` file containing the Auth0 configuration. Here is an example `.env` that includes\nall non-secret values (`cyrusbio-identity-lib` is an Auth0 tenant made specifically for testing this library):\n\n```bash\ncat \u003c\u003c'EOF' \u003e .env\nAUTH0_DOMAIN=xxx\nAUTH0_CLIENT_ID=xxx\nAUTH0_CLIENT_SECRET=xxx\nAUTH0_EXTENSION_URL=xxx\nEOF\n```\n\n### Run all tests\n\n```bash\nenv $(cat .env | xargs) npm test\n```\n\n### Run individual test\n\n```bash\nnpm run testbuild\nenv $(cat .env | xargs) node_modules/.bin/ava test/[test-name].spec.js\n```\n\n### Logging in tests\n\nLogging in tests should use ava `t.log` instead of `console.log`.\nThose logs will appear only when running ava in verbose mode:\n\n```bash\nenv $(cat .env | xargs) node_modules/.bin/ava test/[test-name].spec.js --verbose\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyrusbiotechnology%2Fauth0-authorization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyrusbiotechnology%2Fauth0-authorization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyrusbiotechnology%2Fauth0-authorization/lists"}