Hi @gal1 ,
Thank you for posting this topic on the Auth0 Community!
How can I verify that JWT is OK?
Answer: This article explains how to verify JSON Web Token. And this article explains the jw.verify() function with sample code.
I tried to read pen file and call verify method. but it always fails.
Could you please confirm if the token is valid if verifying it in https://jwt.io/, and check if the token and the secretOrPublicKey passed to your function are valid?
Also, I found two articles in our community regarding the same error. The details in the articles might help solve the error.
If you need further assistance, please provide more context, and I will look into this further. Thank you!