I am trying to verify a jwt using jsonwebtoken. When I am using:
jwt.verify(jwt, publicKey)
I am getting a :
JsonWebTokenError {name: "JsonWebTokenError", message: "invalid algorithm", stack: "JsonWebTokenError: invalid algorithm }
When I am using:
jwt.verify(jwt, publicKey, { algorithms: 'RS256'})
I am getting:
Error: error:0909006C:PEM routines:get_name:no start line
Any ideas? Is there an alternative to verify a jwt?
Update
The problem lies on the RS256 selection probably.