JWT string to verify
key for verification. CryptoKey object, PKCS#8 PEM public key or HMAC hexadecimal key string
verify parameters
true if successfully verified
Error if JWT can't be verified
const key = await getHMACKey("hmacSHA256", "12ab...");
await verifyJWT("eyJhb...", key, {
alg: ["HS256", "HS384"],
iss: ["https://jwt-idp.example.com"],
sub: ["mailto:mike@example.com", "mailto:joe@example.com"],
aud: ["http://foo1.com"],
jti: "id123456",
}) -> true/false
await verifyJWT("eyJ...", "-----BEGIN PUBLIC...", {...}) -> true/false
verify JWT (JSON Web Token)