![Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack](https://cdn.sanity.io/images/cgdhsj6q/production/6af25114feaaac7179b18127c83327568ff592d1-1024x1024.webp?w=800&fit=max&auto=format)
Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
azure-ad-verify-token
Advanced tools
Changelog
Readme
Verify JWT issued by Azure Active Directory B2C.
npm install azure-ad-verify-token --save
import { verify, VerifyOptions } from 'azure-ad-verify-token';
const options: VerifyOptions = {
jwksUri:
'https://contoso.b2clogin.com/contoso.onmicrosoft.com/discovery/v2.0/keys?p=b2c_1_signupsignin1',
issuer:
'https://contoso.b2clogin.com/3285c484-dce5-4abb-a341-bbe4f2bc8554/v2.0/',
audience: '99d1275c-e805-483f-b832-600f8130829c',
};
verify(token, options)
.then((decoded) => {
// verified and decoded token
console.log(decoded);
})
.catch((error) => {
// invalid token
console.error(error);
});
Verify options:
Property | Type | Description |
---|---|---|
jwksUri | string | jwk_uri value obtained from B2C policy metadata endpoint. |
issuer | string | issuer value obtained from B2C policy metadata endpoint. |
audience | string | Application ID of the application accessing the tenant. |
Example metadata endpoints:
import { setConfig } from 'azure-ad-verify-token';
setConfig({
cacheLifetime: 12 * (60 * 60 * 1000), // 12 hours
});
Configuration options:
Property | Type | Description | Default |
---|---|---|---|
cacheLifetime | number | Number of milliseconds to cache public keys. | 1 hour |
npm install
npm run build
FAQs
Verify JWT issued by Azure Active Directory B2C.
The npm package azure-ad-verify-token receives a total of 3,651 weekly downloads. As such, azure-ad-verify-token popularity was classified as popular.
We found that azure-ad-verify-token demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.