Skip to content

"Signature verification raised", yet jwt.io says "Signature Verified" #401

@scottrobertson

Description

@scottrobertson

Hey

Having an odd issue that I cannot seem to replicate very easily.

token = "eyJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InVzZXJfaWQiOjEsInZlcmlmaWVyIjoiM2ExZGNlODItN2YwNC00Mjk1LTljN2QtYzUzYmQ4OGVjNTI3In0sImV4cCI6MTYxMTYyMjMxOH0.7HYR9jAsNeOjQFGGbmUBNalOqmUeLRK9eMldMjGQo38"

secret = "c61a64edec22c03a25f3b984910ac2da216a2963a379f4eaf58abac06f6c975572690925e85a1c52721d388b3c2ab75698e67acc3ec483e23abb98a88b140fd7"

JWT.decode(token, secret, true, { algorithm: 'HS256' })

This throws a JWT::VerificationError (Signature verification raised)

However, if i head over to jwt.io, and type in those exact same values (try it, just copy them from above) it says "Signature Verified"

Any ideas what is wrong here?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions