1.0.1 • Published 1 year ago

@timondev/azure-jwt-verify v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
1 year ago

azure-jwt-verify

Verify JWT Token issued by Azure Active Directory B2C and automatically use the rotated public key from Azure Public Keys URL.

Installation

  • when using npm:

    $ npm install --save @timondev/azure-jwt-verify
  • when using yarn:

    $ yarn add @timondevazure-jwt-verify

Configuration

  • jwkUri and the issuer can be obtained from the metadata endpoint of the policies created in the B2C tenant.
  • AUD(Audience) is the Client ID of the application accessing the tenant.
const config = {
    jwkUri: "",
    issuer: "",
    audience: ""
};

Usage

const decoded = await azureJWT.verify(token, config);
1.0.1

1 year ago

1.0.0

1 year ago