You removed cryptography from requirements but it's necessary to decode RS256 tokens. PyJWT doesn't include cryptography lib in its requirements: https://pyjwt.readthedocs.io/en/stable/installation.html#cryptographic-dependencies-optional