{"id":21801090,"url":"https://github.com/wpcodevo/hs256-rs256-jwt-nodejs","last_synced_at":"2025-08-01T14:04:51.060Z","repository":{"id":171894376,"uuid":"648568313","full_name":"wpcodevo/hs256-rs256-jwt-nodejs","owner":"wpcodevo","description":"In this article, you'll learn how to generate JSON Web Tokens, commonly referred to as JWTs, in Node.js using TypeScript. ","archived":false,"fork":false,"pushed_at":"2023-06-02T10:06:41.000Z","size":16,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T18:33:31.363Z","etag":null,"topics":["access-token","hs256","javascript","jsonwebtoken","jwt","jwt-tokens","nodejs","refresh-token","rs256","rsa-key-pair","typescript"],"latest_commit_sha":null,"homepage":"https://codevoweb.com/generate-and-verify-json-web-tokens-in-nodejs/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wpcodevo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-06-02T09:18:06.000Z","updated_at":"2025-01-17T16:05:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"c3edd889-ed6c-4d3b-9e64-adaab544f0af","html_url":"https://github.com/wpcodevo/hs256-rs256-jwt-nodejs","commit_stats":null,"previous_names":["wpcodevo/hs256-rs256-jwt-nodejs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wpcodevo/hs256-rs256-jwt-nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpcodevo%2Fhs256-rs256-jwt-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpcodevo%2Fhs256-rs256-jwt-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpcodevo%2Fhs256-rs256-jwt-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpcodevo%2Fhs256-rs256-jwt-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wpcodevo","download_url":"https://codeload.github.com/wpcodevo/hs256-rs256-jwt-nodejs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpcodevo%2Fhs256-rs256-jwt-nodejs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268240356,"owners_count":24218356,"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-08-01T02:00:08.611Z","response_time":67,"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":["access-token","hs256","javascript","jsonwebtoken","jwt","jwt-tokens","nodejs","refresh-token","rs256","rsa-key-pair","typescript"],"created_at":"2024-11-27T11:16:12.459Z","updated_at":"2025-08-01T14:04:51.027Z","avatar_url":"https://github.com/wpcodevo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to Generate and Verify JSON Web Tokens in Node.js\n\nIn this article, you'll learn how to generate JSON Web Tokens, commonly referred to as JWTs, in Node.js using TypeScript. Now, I could have just used JavaScript, but bear with me because TypeScript is now widely adopted by companies. It has become the go-to language for modern web development, and I can't even remember the last time I built a web app without TypeScript.\n\n![How to Generate and Verify JSON Web Tokens in Node.js](https://codevoweb.com/wp-content/uploads/2023/06/How-to-Generate-and-Verify-JSON-Web-Tokens-in-Node.js.webp)\n\n## Topics Covered\n\n- Sign and Verify JWTs using the HS256 Algorithm\n    - Function to Sign the JWT with the HS256 Algorithm\n    - Function to Verify the JWT with the HS256 Algorithm\n    - Sign and Verify the JWT with the HS256 Algorithm\n- Sign and Verify JWTs using the RS256 Algorithm\n    - Generate the RSA Private and Public Keys\n    - Function to Sign the JWT with the RS256 Algorithm\n    - Function to Verify the JWT with the RS256 Algorithm\n    - Sign and Verify the JWT with the RS256 Algorithm\n    - Generate the RSA Private and Public Keys Online\n- Pros and Cons of HS256 (HMAC-SHA256)\n- Pros and Cons of RS256 (RSA-SHA256)\n- Conclusion\n\nRead the entire article here: [https://codevoweb.com/generate-and-verify-json-web-tokens-in-nodejs/](https://codevoweb.com/generate-and-verify-json-web-tokens-in-nodejs/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpcodevo%2Fhs256-rs256-jwt-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwpcodevo%2Fhs256-rs256-jwt-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpcodevo%2Fhs256-rs256-jwt-nodejs/lists"}