{"id":23757535,"url":"https://github.com/scientanl/axios-oauth2","last_synced_at":"2025-09-05T04:32:15.121Z","repository":{"id":52907838,"uuid":"341826541","full_name":"ScientaNL/axios-oauth2","owner":"ScientaNL","description":"This library makes oauth with axios easy. There is a oauth-client, a token interceptor and caching.","archived":false,"fork":false,"pushed_at":"2025-05-08T10:22:04.000Z","size":62,"stargazers_count":6,"open_issues_count":2,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-08-31T21:32:35.604Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@scienta/axios-oauth2","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ScientaNL.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":"2021-02-24T08:13:33.000Z","updated_at":"2025-05-08T10:22:07.000Z","dependencies_parsed_at":"2025-05-08T11:24:40.349Z","dependency_job_id":"aec3f7ca-1f23-42ad-a53c-4ed1772952ae","html_url":"https://github.com/ScientaNL/axios-oauth2","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/ScientaNL/axios-oauth2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScientaNL%2Faxios-oauth2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScientaNL%2Faxios-oauth2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScientaNL%2Faxios-oauth2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScientaNL%2Faxios-oauth2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ScientaNL","download_url":"https://codeload.github.com/ScientaNL/axios-oauth2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScientaNL%2Faxios-oauth2/sbom","scorecard":{"id":126729,"data":{"date":"2025-08-11","repo":{"name":"github.com/ScientaNL/axios-oauth2","commit":"8b19df3711ba3441903559a9a87c493dddcd46e0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/21 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":4,"reason":"dependency not pinned by hash detected -- score normalized to 4","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr-check.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/ScientaNL/axios-oauth2/pr-check.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr-check.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/ScientaNL/axios-oauth2/pr-check.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-npm-version-publish.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/ScientaNL/axios-oauth2/release-npm-version-publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-npm-version-publish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/ScientaNL/axios-oauth2/release-npm-version-publish.yml/main?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   1 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/pr-check.yml:1","Warn: no topLevel permission defined: .github/workflows/release-npm-version-publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"25 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-cph5-m8f7-6c5x","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T04:06:29.769Z","repository_id":52907838,"created_at":"2025-08-16T04:06:29.769Z","updated_at":"2025-08-16T04:06:29.769Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273713290,"owners_count":25154606,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-31T19:48:41.674Z","updated_at":"2025-09-05T04:32:10.077Z","avatar_url":"https://github.com/ScientaNL.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# axios-oauth2\nThis library makes oauth with axios easy.\nThere is a oauth-client, a token interceptor and caching.\n\n## Quickstart\nYou can use only the client, or combine it with the token interceptor and caching.\n\n### Simple client usage\n```ts\nimport axios from 'axios';\nimport {clientFactory} from '@scienta/axios-oauth';\nconst client = clientFactory(axios.create(), {\n  url: 'https://oauth.com/2.0/token',\n  grant_type: 'client_credentials',\n  client_id: 'foo',\n  client_secret: 'bar',\n  scope: 'baz'\n});\n\nconst auth = await client(); // =\u003e { \"access_token\": \"...\", \"expires_in\": 900, ... }\n```\n\n### Client usage with interceptor\n```ts\nimport axios from 'axios';\nimport {clientFactory, interceptorFactory} from '@scienta/axios-oauth';\nconst axiosInstance = axios.create();\naxiosInstance.interceptors.request.use(\n  interceptorFactory(clientFactory(axiosInstance, {\n    url: 'https://oauth.com/2.0/token',\n    grant_type: 'client_credentials',\n    client_id: 'foo',\n    client_secret: 'bar',\n    scope: 'baz'\n  }))\n);\naxiosInstance.get('https://oauth.com/2.0/protectedResource')\n```\n\n### Client usage with token-caching interceptor\n```ts\nimport axios from 'axios';\nimport {clientFactory, interceptorFactory, LockingTokenCache} from '@scienta/axios-oauth';\n\nconst axiosInstance = axios.create();\naxiosInstance.interceptors.request.use(\n  interceptorFactory(\n    clientFactory(axiosInstance, {\n      url: 'https://oauth.com/2.0/token',\n      grant_type: 'client_credentials',\n      client_id: 'foo',\n      client_secret: 'bar',\n      scope: 'baz'\n    }),\n    new LockingTokenCache()\n  )\n);\n\naxiosInstance.get('https://oauth.com/2.0/protectedResource')\n```\n\n## Locking cache (used by LockingTokenCache)\nThe `LockingTokenCache` class uses a separate library for locking and caching.\nLocking cache is a caching-library suited for simple and complex locking while caching.\nLocking with caching ensures that only one request is executed to request a token.\nWant to know more? [@scienta/locking-cache](https://www.npmjs.com/package/@scienta/locking-cache).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscientanl%2Faxios-oauth2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscientanl%2Faxios-oauth2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscientanl%2Faxios-oauth2/lists"}