Gathering detailed insights and metrics for jwks-client-browser
Gathering detailed insights and metrics for jwks-client-browser
Gathering detailed insights and metrics for jwks-client-browser
Gathering detailed insights and metrics for jwks-client-browser
Library to retrieve public key from a JWKS endpoint in the browser.
npm install jwks-client-browser
Typescript
Module System
Node Version
NPM Version
TypeScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
25 Commits
1 Watchers
33 Branches
1 Contributors
Updated on Sep 22, 2019
Latest Version
0.0.8
Package Id
jwks-client-browser@0.0.8
Unpacked Size
11.34 kB
Size
4.00 kB
File Count
5
NPM Version
6.4.1
Node Version
10.15.3
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
7
This pacakge was created, because the current JWKS clients available only work in node, but not in the browser. This client is specifically designed to work in the browser. Given a JWKS endpoint URL and a kid
it will retrieve the public key that you can use for JWT verification.
1npm i jwks-client-browser
or
1yarn add jwks-client-browser
1import JwksClient from 'jwks-client-browser'; 2 3const kid = JSON.parse(atob(token.split('.')[0])).kid 4 5const jwksClient = new JwksClient({ url: '[your_jwks_endpoint]' }); 6 7const signingKey = jwksClient.getSigningKey(kid);
1import JwksClient, { ISigningKeyPem } from 'jwks-client-browser'; 2 3const kid: string = JSON.parse(atob(token.split('.')[0])).kid 4 5const jwksClient: JwksClient = new JwksClient({ url: '[your_jwks_endpoint]' }); 6 7const signingKey: ISigningKeyPem = jwksClient.getSigningKey(kid);
Once you acquired the public key, you can use it to verify the token. Here's an example using the jsonwebtoken
package:
1import jwt from 'jsonwebtoken'; 2 3const signingKey: ISigningKeyPem = jwksClient.getSigningKey(kid); 4 5jwt.verify(token, signingKey.publicKey);
This is still a draft version of the package. Contributions are welcome!
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no SAST tool detected
Details
Reason
Found 0/25 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
66 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More