
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
azure-ad-verify-token
Advanced tools
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 0 weekly downloads. As such, azure-ad-verify-token popularity was classified as not popular.
We found that azure-ad-verify-token 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.