node-rs
node-rs copied to clipboard
[jsonwebtoken] cannot skip audience validation
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.
the same issue for me
Here is the fix https://github.com/napi-rs/node-rs/pull/910