JWTVerify
Last updated
Was this helpful?
Was this helpful?
// Basic verify
payload = jwtVerify( token, secret, "HS256" );
// With claim assertions
payload = jwtVerify( token, secret, "HS256", {
claims: { iss: "my-api", aud: "mobile-app" }
} );
// With explicit clock skew
payload = jwtVerify( token, secret, "HS256", { clockSkew: 30 } );
// RSA verify with public key
payload = jwtVerify( token, publicKeyPem, "RS256" );