node-rs icon indicating copy to clipboard operation
node-rs copied to clipboard

[jsonwebtoken] cannot skip audience validation

Open ayZagen opened this issue 1 year ago • 2 comments

How to skip audience and issuer checks?

  const decoded = decodeHeader( jwtString);
  const res = await verify(
    jwtString,
    cert,
    { algorithms: [ decoded.algorithm ], aud: undefined, iss: undefined, sub: undefined }
  );
// Throws { "code": "GenericFailure", "stack": "InvalidAudience" }

not defining or giving an empty array is not working too.

ayZagen avatar Jul 30 '24 15:07 ayZagen

the same issue for me

pasha-vuiko avatar Oct 22 '24 18:10 pasha-vuiko

Here is the fix https://github.com/napi-rs/node-rs/pull/910

pasha-vuiko avatar Oct 22 '24 19:10 pasha-vuiko