{"id":23070206,"url":"https://github.com/nordes/oidc-jwks-verify","last_synced_at":"2026-04-30T01:34:27.637Z","repository":{"id":57313890,"uuid":"118457764","full_name":"Nordes/oidc-jwks-verify","owner":"Nordes","description":"Allow the verification of the JWT token against an Identity Server from NodeJs","archived":false,"fork":false,"pushed_at":"2018-02-02T13:51:48.000Z","size":248,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T09:15:54.258Z","etag":null,"topics":["backend","identityserver4","jwks","jwt","node","nodejs","oidc","oidc-jwks-verify"],"latest_commit_sha":null,"homepage":null,"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/Nordes.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}},"created_at":"2018-01-22T13:01:58.000Z","updated_at":"2018-01-25T14:40:09.000Z","dependencies_parsed_at":"2022-09-20T23:21:36.540Z","dependency_job_id":null,"html_url":"https://github.com/Nordes/oidc-jwks-verify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nordes%2Foidc-jwks-verify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nordes%2Foidc-jwks-verify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nordes%2Foidc-jwks-verify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nordes%2Foidc-jwks-verify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nordes","download_url":"https://codeload.github.com/Nordes/oidc-jwks-verify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246981166,"owners_count":20863828,"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":["backend","identityserver4","jwks","jwt","node","nodejs","oidc","oidc-jwks-verify"],"created_at":"2024-12-16T06:20:20.614Z","updated_at":"2026-04-30T01:34:27.590Z","avatar_url":"https://github.com/Nordes.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oidc-jwks-verify\r\n![](https://api.travis-ci.org/Nordes/oidc-jwks-verify.svg?branch=master) \r\n[![Coverage Status](https://coveralls.io/repos/github/Nordes/oidc-jwks-verify/badge.svg?branch=master)](https://coveralls.io/github/Nordes/oidc-jwks-verify?branch=master) [![npm version](https://badge.fury.io/js/oidc-jwks-verify.svg)](https://badge.fury.io/js/oidc-jwks-verify)\r\n\r\nCode inspired from [express-oidc-jwks-verify](https://github.com/Nordes/oidc-jwks-verify). The reason why this project exists was for my project that needed to connect and validate the JWT token without using the express library.\r\n\r\n# Scenario\r\n1. Server is having a Validation Key to validate the user tokens ([AddValidationKey](http://docs.identityserver.io/en/release/topics/startup.html#refstartupkeymaterial) in IdentityServer)\r\n2. The client want to validate the token against the server (basically a key check)\r\n3. We validate the id_token and then consider the user really authenticated\r\n\r\n## Installation [Not yet deployed as a npm package]\r\nThe installation is simple:\r\n\r\n```bash\r\nnpm install oidc-jwks-verify\r\n```\r\n\r\n## Usage\r\nExample in typescript:\r\n```js\r\nimport { VerifyOidc, VerifyStatusCode } from 'oidc-jwks-verify'\r\nlet oidcValidator = new VerifyOidc({ issuer: `http://localhost:5000` })\r\n\r\n// Somewhere in your code\r\noidcValidator.verify(accessToken).then((result: VerifyStatusCode) =\u003e {\r\n  // Result returns [Authorized|Unauthorized|Unknown] (Unknown should never happen)\r\n  console.log(result)\r\n})\r\n```\r\n\r\n## When building locally\r\n```bash\r\n$ npm install\r\n$ npm run build\r\n$ # Now a folder called lib will be available.\r\n```\r\n\r\n### Build Dependencies\r\nPackage: __x509__\r\n- node-gyp (python... https://github.com/nodejs/node-gyp if not already installed)\r\n- msbuild 14 (vs 2015?... https://www.microsoft.com/en-us/download/confirmation.aspx?id=48159 if not already installed)\r\n- openSSL (Otherwise an error... `LINK : fatal error LNK1181: cannot open input file 'C:\\OpenSSL-Win64\\lib\\libeay32.lib' [C:\\...\\oidc-jwks-verify\\node_modules\\x509\\build\\x509.vcxproj]\r\ngyp ERR! build error` available at https://slproweb.com/products/Win32OpenSSL.html and https://github.com/ethereumjs/ethereumjs-util/issues/43 (see for the libeay32.lib link at the end))\r\n\r\n## Running tests?\r\n```bash\r\nnpm run test\r\n```\r\n\u003e Some tests might fail since you need to update the token to be validated. The default max-age for the token is 30 minutes. If you want to create a new token, please create a certificate (pfx) add it to your identity server and then get the well known data and update the mock. I can't fake the x509 validation process. I would say, that at this moment I don't know how to mock it.\r\n\r\n# Side note\r\nWhile working on this OIDC validator, I found also an another interesting project called [Oidc](https://github.com/techops-peopledata/oidc). It might be worth for some people depending on their needs. The idea is similar.\r\n\r\n# License\r\nMIT (Enjoy)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnordes%2Foidc-jwks-verify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnordes%2Foidc-jwks-verify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnordes%2Foidc-jwks-verify/lists"}