IndominusByte / fastapi-jwt-auth

FastAPI extension that provides JWT Auth support (secure, easy to use, and lightweight)
http://indominusbyte.github.io/fastapi-jwt-auth/
MIT License
627 stars 143 forks source link

AttributeError: 'str' object has no attribute 'decode' #89

Open sombek opened 1 year ago

sombek commented 1 year ago

I am using pyjwt version 2.4.0 and I think it's conflicting and showing this error: AttributeError: 'str' object has no attribute 'decode' When I try to use this:

access_token = self.authorize.create_access_token(subject=body.phone)
refresh_token = self.authorize.create_refresh_token(subject=body.phone)

When I down grade pyjwt to 1.7.0 it works fine.

BaLaLaLs commented 1 year ago

same problem

mmasztalerczuk commented 1 year ago

Hi, I have made a fork of this repo and this issue is fixed in 0.1.7: https://pypi.org/project/fastapi-another-jwt-auth/