Open LarryMartell opened 3 years ago
I faced the same problem. I tried to install it on another server, use different proxy servers and nothing did help.
I tried to install it from the source and it works! If install by pip it still gets the error.
@boterfly what version of PyJWT do you have?
I had the same problem, I and Larry found that
https://github.com/AngellusMortis/django_microsoft_auth/blob/2.4.0/reqs/requirements.in I added pyjwt==1.7.1 into my requirements.txt and it fix the problem.
@boterfly what version of PyJWT do you have?
Name: PyJWT Version: 2.0.1 Summary: JSON Web Token implementation in Python Home-page: https://github.com/jpadilla/pyjwt Author: Jose Padilla Author-email: hello@jpadilla.com License: MIT Location: /usr/local/lib/python3.7/site-packages/PyJWT-2.0.1-py3.7.egg Requires: Required-by: django-microsoft-auth
But I noticed, that in requirment.txt there is no pyjwt, so next time I will try to add it. I think when you install django microsoft auth by pip, it doesn't install all requirements, but when you install from the source it does.
pyjwt
is right here in the requirements: https://github.com/AngellusMortis/django_microsoft_auth/blob/master/requirements.txt#L16
Also the requirements.txt
is only for testing and development. If you are installing on a production machine, the setup.py
(and by extension the requirements.in
file) are using which does not have a specific version of pyjwt
pinned. If you are using the requirements.txt
for a production environment, stop.
Ok, thanks!
I found that downgrading pyjwt from 2.0.1 to 1.7.1 fixed this for me.
I have an app using this package and it's deployed on many EC2 instances at AWS, all working fine, all running:
Starting yesterday any new systems we deploy the auth is failing. We get back
Failed to authenticate you for an unknown reason. Please try again later
. We can see in the azure logs that the login was successful. The application code is the same, and we have the same version of every python package installed, but for some reason on newly built boxes it is failing but older ones it is succeeding. I did notice that for some OS packages the versions are slightly different. Could there be a dependency on one of those? Any suggestions on how to debug this?Below are the package diffs - the higher version numbers are from the system that does not work: