JsonWebTokenError: invalid signature while verifying token using JWT
I’m using node.js example. I give a plain text secret key and I verify the token using the following line.
This line would throw the error JsonWebTokenError: invalid signature when the key looks valid when you validate it in the JWT Debugging Tool. JWT would actually say Signature Verified.
I fixed this error by using the Base64 version of the secret key. Plain text just didn’t work for me.
const jwtKey = 'QHhpZGlvCg=='
You could try the same.