MushroomMaula / fastapi_login

FastAPI-Login tries to provide similar functionality as Flask-Login does.
https://pypi.org/project/fastapi-login
MIT License
639 stars 58 forks source link

No version given for pyjwt dependency #94

Closed HealYouDown closed 1 year ago

HealYouDown commented 2 years ago

fastapi-login does not have a version dependency for pyjwt. The change in f31b6718b8b8e23adda33de9cf18972b4d129830 however expects you to have version >= 2.0, as before, jwt.encode returned the token as bytes, not as str.

Propsed fix would be to set the version to ^2.0 instead of *. Alternatively, if support for all version is still wanted, you could also check the return type of jwt.encode and cast it to str.

zandb2009 commented 1 year ago

Yes, I found the same problem.