I tried following the docs:
// simple validation for HS256
isValid = KJUR.jws.JWS.verifyJWT("eyJhbG...", "616161", {alg: ["HS256"]}),
This is what I'm running:
const isValid = KJUR.jws.JWS.verifyJWT(token, jwtSecret, {alg: ["HS256"]});
but this throws an error:
TypeError: Cannot read property 'alg' of undefined
Please let me know what I'm missing. It seems like according to the docs this should work.
I'm using these versions:
"typescript": "5.0.4",
"jsrsasign": "11.1.0",
"jsrsasign-util": "1.0.5"
Thanks!