
Security News
ESLint Adds Official Support for Linting HTML
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
bashleigh-idtoken-verifier
Advanced tools
A lightweight library to decode and verify RS JWT meant for the browser.
A lightweight library to decode and verify RS JWT meant for the browser.
import IdTokenVerifier from 'idtoken-verifier';
const verifier = new IdTokenVerifier({
issuer: 'https://my.auth0.com/',
audience: 'gYSNlU4YC4V1YPdqq8zPQcup6rJw1Mbt'
});
verifier.verify(id_token, nonce, (error, payload) => {
if (error) {
// handle the error
return;
}
// do something with `payload`
});
Initializes the verifier.
Parameters:
/.well-known/jwks.json
endpoint (or jwksURI
if provided) each time it verifies a token. You can provide a cache to store the keys and avoid repeated requests. For the contract, check this example. Hint: for in-memory cache, an easy way is to just provide new Map()
, which is a valid object for jwksCache.${id_token.iss}/.well-known/jwks.json
This method will decode the ID token, then verify the token for OIDC compliance using a series of checks on the claims found inside the token.
Parameters
This method will decode the token header and payload WITHOUT doing any verification.
Parameters
Return
To make it as lightweight as posible, it only provides support for RS256 tokens. It can be easily extensible to other RS* algorithms.
If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.
This project is licensed under the MIT license. See the LICENSE file for more info.
FAQs
A lightweight library to decode and verify RS JWT meant for the browser.
The npm package bashleigh-idtoken-verifier receives a total of 127 weekly downloads. As such, bashleigh-idtoken-verifier popularity was classified as not popular.
We found that bashleigh-idtoken-verifier demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.