0

I am trying to decode a token in python using jwt.decode(token, options={'verify_signature': False} ). I am getting this error though -

self = <jwt.api_jws.PyJWS object at 0x9f6beaf1e6d0>, jwt = None
    def _load(self, jwt):
        if isinstance(jwt, str):
            jwt = jwt.encode("utf-8")
    
        if not isinstance(jwt, bytes):
>           raise DecodeError(f"Invalid token type. Token must be a {bytes}")
E           jwt.exceptions.DecodeError: Invalid token type. Token must be a <class 'bytes'>
venv/lib/python3.8/site-packages/jwt/api_jws.py:217: DecodeError

I also tried passing key as 'secret' and algorithm as 'RS256' but in fail. Would appreciate any help with the error message above. Thanks!

Christina
  • 117
  • 1
  • 8

0 Answers0