python-social-auth/social-core

ModuleNotFoundError: No module named 'jose'

petrprikryl opened this issue · 4 comments

Installing the latest version 4.4.0 leads to error looking for python-jose when importing FacebookOAuth2. This is not happening on 4.3.0.

Is it intended and python-jose should be moved from extras? Or I need to install extra openidconnect for Facebook backend?

...
     from social_core.backends.facebook import FacebookOAuth2
   File "/usr/local/lib/python3.11/site-packages/social_core/backends/facebook.py", line 20, in <module>
     from .open_id_connect import OpenIdConnectAuth
   File "/usr/local/lib/python3.11/site-packages/social_core/backends/open_id_connect.py", line 5, in <module>
     from jose import jwk, jwt
ModuleNotFoundError: No module named 'jose'

Hello there, is there a plan to fix this or should we go with one of the workarounds mentioned? Thanks

nijel commented

Yes, the plan is to fix that. Just somebody needs to have time for that. Out of the outlined solutions, I tend to think that “splitting limited Facebook authentication to a separate module to avoid this dependency” is the best approach. A pull request implementing that is welcome.

nijel commented

Proposed fix: #778