{"id":41865299,"url":"https://github.com/tomitribe/jwt-js-decode","last_synced_at":"2026-01-25T11:40:05.658Z","repository":{"id":32505730,"uuid":"135266388","full_name":"tomitribe/jwt-js-decode","owner":"tomitribe","description":"JavaScript library that decodes JSON Web Tokens (JWT)","archived":false,"fork":false,"pushed_at":"2024-05-09T15:15:31.000Z","size":1301,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-11-07T02:00:47.862Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomitribe.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}},"created_at":"2018-05-29T08:37:32.000Z","updated_at":"2024-05-09T15:15:37.000Z","dependencies_parsed_at":"2024-05-09T16:43:37.686Z","dependency_job_id":null,"html_url":"https://github.com/tomitribe/jwt-js-decode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tomitribe/jwt-js-decode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomitribe%2Fjwt-js-decode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomitribe%2Fjwt-js-decode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomitribe%2Fjwt-js-decode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomitribe%2Fjwt-js-decode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomitribe","download_url":"https://codeload.github.com/tomitribe/jwt-js-decode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomitribe%2Fjwt-js-decode/sbom","scorecard":{"id":892745,"data":{"date":"2025-08-11","repo":{"name":"github.com/tomitribe/jwt-js-decode","commit":"7892c22775ae4f0020512a0d15c384674dde5b30"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/8 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/testing-workflow.yaml: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":"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":"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":"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":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/testing-workflow.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/tomitribe/jwt-js-decode/testing-workflow.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/testing-workflow.yaml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/tomitribe/jwt-js-decode/testing-workflow.yaml/master?enable=pin","Info:   0 out of   2 GitHub-owned 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":"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: Apache License 2.0: 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 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 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"}},{"name":"Vulnerabilities","score":0,"reason":"17 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T12:29:09.102Z","repository_id":32505730,"created_at":"2025-08-24T12:29:09.102Z","updated_at":"2025-08-24T12:29:09.102Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28752668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T10:25:12.305Z","status":"ssl_error","status_checked_at":"2026-01-25T10:25:11.933Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-01-25T11:40:04.886Z","updated_at":"2026-01-25T11:40:05.652Z","avatar_url":"https://github.com/tomitribe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jwt-js-decode\n\nJavaScript library that decodes JSON Web Tokens (JWT)\njwt-js-decode the easy way\n\n## Use cases\n\nWorks in:\n\n- all modern browsers that support WebCrypto API\n- Node.js using 'crypto' (default node-js lib)\n- any other js env using 'crypto-browserify' (with require replacement to 'crypto'')\n\n## Getting Started\n\nInstall Jest using [`yarn`](https://yarnpkg.com/en/package/jwt-js-decode):\n\n```bash\nyarn add jwt-js-decode\n```\n\nOr via [`npm`](https://www.npmjs.com/package/jwt-js-decode):\n\n```bash\nnpm i -S jwt-js-decode\n```\n\n### Require lib\n\n```javascript\nimport * as jwtJsDecode from 'jwt-js-decode';\n```\n\nor\n\n```javascript\nconst jwtJsDecode = require('jwt-js-decode');\n```\n\nor\n\n```html\n\u003cscript src=\"//unpkg.com/jwt-js-decode@1.9.0/dist/jwt-js-decode.pkg.min.js\"\u003e\u003c/script\u003e\n```\n\nOther links you can find on [`yarn`](https://yarnpkg.com/en/package/jwt-js-decode)\n\nP.S. For Webpack 5 browser bundling, there is need to add crypto fallback config ([example stackblitz](https://stackblitz.com/edit/github-m1gvkd?file=webpack.config.js)):\n\n```javascript\nresolve: {\n  fallback: {\n    crypto: false,\n  },\n},\n```\n\n### Usage\n\nDecode JWT token into `{header: Object, payload: Object, signature: String}`\n\n```javascript\n    import { decode } from 'jwt-js-decode';\n\n    let jwt = decode('token');\n    console.log(jwt.payload);\n```\n\nVerify JWT token with provided secret and decode it after\n\n```javascript\n    import { decode, verify } from 'jwt-js-decode';\n    \n    verify('token', 'secret').then(res =\u003e {\n        if (res === true) {\n            const jwt = decode('token');\n            console.log(jwt.payload);\n        }\n    });\n```\n\nResign JWT token with newSecret secret should be same type as `jwt.header.alg`\n\n```javascript\n    import { resign } from 'jwt-js-decode';\n\n    resign('token', 'newSecret').then(newToken =\u003e  {\n        console.log(newToken);\n    });\n```\n\n## Sandboxes\n\nRunkit (node.js sandbox 1.9.0)\n[https://npm.runkit.com/jwt-js-decode](https://npm.runkit.com/jwt-js-decode)\n\nPlunkr (browser sandbox 1.9.0 + CodeMirror)\n[https://plnkr.co/edit/WaawWXswkexfXaFfRDjQ](https://plnkr.co/edit/WaawWXswkexfXaFfRDjQ)\n\nPlunkr (browser sandbox 1.9.0)\n[https://plnkr.co/edit/zCNpiTXBbPKNxNVnHhkU](https://plnkr.co/edit/zCNpiTXBbPKNxNVnHhkU)\n\n## Development\n\nFirst you'll need to clone this repository to folder you will test it in.\n\nThen insall all dependencies.\n\n```bash\nnpm i\n```\n\nFor testing functionality jest testing is used, npm `test` script will rebuild dist and docs folder.\n\nAfter changes in jwt-js-decode source and just for the first run use:\n\n```bash\nnpm test\n```\n\nFor sequential runs and just new test you can run:\n\n```bash\nnpm run jest\n```\n\nTOC:\n\n* [Home](https://github.com/tomitribe/jwt-js-decode)\n* [Docs](/docs/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomitribe%2Fjwt-js-decode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomitribe%2Fjwt-js-decode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomitribe%2Fjwt-js-decode/lists"}