When I go to https://jwt.io/ I'm able to decode my token without any secret. I just paste the token and it'll be decoded.
But when I go to my code and try to decode it without a secret, I'll get the following error:
jwt.exceptions.InvalidSignatureError: Signature verification failed
This is my code:
import jwt
token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXNzYWdlIjoidGhpcyBpcyBhIHNlY3JldCBtZXNzYWdlIiwiaWF0IjoxNjc4MjE1ODY1fQ.jrNYdkoNau5H20CGXlHK5nASGxY7xLD8LF6zxt-thLY'
decoded = jwt.decode(token, verify_signature=False, algorithms=['HS256'])
print(decoded)
By the way, this like will work just fine
decoded = jwt.decode(token, 'secret', verify_signature=False, algorithms=['HS256'])
And this will also fail
decoded = jwt.decode(token, 'secret', verify=False, algorithms=['HS256'])
Is there a way to decode it without the secret like in https://jwt.io?