Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 860 Bytes

README.md

File metadata and controls

32 lines (26 loc) · 860 Bytes

node-azureTokenValidation

Description

This class will validate id tokens from Azure B2C by using the public key signing information

Azure

Other

Node Dependencies

  • jsonwebtoken
  • node-fetch
  • node-forge

Example

Validate an ID token

const atv = new AzureTokenValidation()
const idToken = 'THE_AZURE_ID_TOKEN_HERE' // This will be sent in the callback from Azure B2C

atv.validate(idToken).then(result => {
    if (result) {
        // Token is valid
        console.log(result)
    } else {
        // Token is not valid
    }
})