async function verifySignature(keysArray, kid, jws) {
  const keyJson = keysArray.find(key => key.kid === kid);
  if (keyJson) {
    const pem = jwkToPem(keyJson);
    await jwt.verify(jws, pem);
    return;
  }
  throw new Error ("Unable to verify signature");
}
/**
 *
 * This function verifies that the signature is from App ID
 * If the signature cannot be verified, it throws an error
 *
 */
This function verifies that the signature is from App ID
If the signature cannot be verified, it throws an error
This function verifies that the signature is from App ID If the signature cannot be verified it throws an error
async function verifySignature(keysArray, kid, jws) {
  const keyJson = keysArray.find(key => key.kid === kid);
  if (keyJson) {
    const pem = jwkToPem(keyJson);
    await jwt.verify(jws, pem);
    return;
  }
  throw new Error ("Unable to verify signature");
}
async function verifySignature ( keysArray , kid , jws ) { const keyJson = keysArray . find ( key => key . kid === kid ) ; if ( keyJson ) { const pem = jwkToPem ( keyJson ) ; await jwt . verify ( jws , pem ) ; return ; } throw new Error ( "Unable to verify signature" ) ; }
This function verifies that the signature is from App ID
 If the signature cannot be verified, it throws an error
This function verifies that the signature is from App ID If the signature cannot be verified it throws an error