{"id":15155221,"url":"https://github.com/sugamkuber/jwt-lite","last_synced_at":"2026-01-05T23:04:50.668Z","repository":{"id":249844031,"uuid":"832706412","full_name":"SugamKuber/jwt-lite","owner":"SugamKuber","description":"A lightweight npm library to handle json web tokens","archived":false,"fork":false,"pushed_at":"2024-07-25T08:13:41.000Z","size":121,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T20:14:01.724Z","etag":null,"topics":["auth","javascript","json-web-token","jwt","jwt-authentication","jwt-token","next","type-safe","typescript"],"latest_commit_sha":null,"homepage":"https://jwt-lite.vercel.app/","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/SugamKuber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2024-07-23T14:58:19.000Z","updated_at":"2024-07-25T08:13:44.000Z","dependencies_parsed_at":"2024-07-23T18:29:11.162Z","dependency_job_id":"208ab0e1-a4d5-43d1-9f0a-9117c9ee454f","html_url":"https://github.com/SugamKuber/jwt-lite","commit_stats":null,"previous_names":["sugamkuber/jwt-lite"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SugamKuber%2Fjwt-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SugamKuber%2Fjwt-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SugamKuber%2Fjwt-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SugamKuber%2Fjwt-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SugamKuber","download_url":"https://codeload.github.com/SugamKuber/jwt-lite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245579677,"owners_count":20638679,"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":["auth","javascript","json-web-token","jwt","jwt-authentication","jwt-token","next","type-safe","typescript"],"created_at":"2024-09-26T18:03:14.320Z","updated_at":"2026-01-05T23:04:50.606Z","avatar_url":"https://github.com/SugamKuber.png","language":"TypeScript","readme":"# jwt-lite\r\n\r\n```\r\nnpm i jwt-lite-2024\r\n```\r\njwt-lite is a lightweight npm library for handling JWT tokens in JavaScript and TypeScript applications. It provides simple methods for encoding, decoding, and validating JWT tokens with a focus on ease of use.\r\n\r\n---\r\n\r\n### [NPM LINK](https://www.npmjs.com/package/jwt-lite-2024)\r\n- The above source code is in \"main\" branch\r\n### [DEMO LINK](https://jwt-lite.vercel.app/)\r\n- The above source code is in \"demo\" branch\r\n\r\n## Functions \r\n\r\n1. *encode()*: Creates a new JWT token by combining a unique identifier, custom payload, and optional parameters, returning a signed string token.\r\n```\r\nencode(id, payload, options):string\r\n```\r\n2. *decode()*: Parses a JWT token string, verifies its signature, and returns the decoded payload along with expiration information, throwing an error if the token is invalid or expired.\r\n```\r\ndecode(token):DecodedJwt\r\n```\r\n3. *validate()*: Checks the validity of a JWT token, including its signature and expiration time, returning a boolean indicating whether the token is currently valid and usable.\r\n```\r\nvalidate(token):boolean\r\n```\r\n\r\n---\r\n\r\nMade with  ♥ by [Sugam Kuber](https://www.linkedin.com/in/sugamkuber/)\r\n\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsugamkuber%2Fjwt-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsugamkuber%2Fjwt-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsugamkuber%2Fjwt-lite/lists"}