labd / django-cognito-jwt

An Authentication backend for Django Rest Framework for AWS Cognito JWT tokens
MIT License
177 stars 59 forks source link

WrappedAttributeError at / module 'jwt' has no attribute 'ExpiredSignature' #34

Open MobeenAshraf opened 3 years ago

MobeenAshraf commented 3 years ago

I am getting the following error (Presumable after token is Expired):

WrappedAttributeError at /api/ module 'jwt' has no attribute 'ExpiredSignature'

The package was working perfectly for 2-3 months but this has started appearing recently.

ebk46 commented 3 years ago

This is because of an update to pyjwt which is an underlying dependency. There were breaking changes and this package is unfortunately not pinned to a particular version. It should be easy enough to fix but the last issue that was resolved in this project was 6 months ago so I wonder if it's even an active project anymore.

The fastest way to fix this for now would be to specify pyjwt==1.7.1 in your project's dependencies, and that should be used by django-cognito-jwt.

TannyS26 commented 2 years ago

you can use the files (validator.py and backend.py) directly in your project without installing this library and replace the ExpiredSignature with ExpiredSignatureError

MichelML commented 2 years ago

@mikedebock you can also close this issue it was solved in #41