Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'jose' #773

Closed
petrprikryl opened this issue Mar 16, 2023 · 4 comments · Fixed by #778
Closed

ModuleNotFoundError: No module named 'jose' #773

petrprikryl opened this issue Mar 16, 2023 · 4 comments · Fixed by #778

Comments

@petrprikryl
Copy link

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'
@nijel
Copy link
Member

nijel commented Mar 17, 2023

That was not intended, see python-social-auth/social-app-django#427 (comment) and #590 (comment)

@alejofl
Copy link

alejofl commented Mar 22, 2023

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

@nijel
Copy link
Member

nijel commented Mar 23, 2023

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 added a commit to nijel/social-core that referenced this issue Mar 27, 2023
This removes jose dependency from Facebook backend.

Fixes python-social-auth#773
@nijel
Copy link
Member

nijel commented Mar 27, 2023

Proposed fix: #778

nijel added a commit to nijel/social-core that referenced this issue Mar 27, 2023
This removes jose dependency from Facebook backend.

Fixes python-social-auth#773
nijel added a commit that referenced this issue Mar 30, 2023
This removes jose dependency from Facebook backend.

Fixes #773
nijel added a commit to nijel/social-app-django that referenced this issue Mar 30, 2023
nijel added a commit to nijel/social-app-django that referenced this issue Mar 30, 2023
nijel added a commit to nijel/social-app-django that referenced this issue Mar 30, 2023
nijel added a commit to python-social-auth/social-app-django that referenced this issue Mar 30, 2023
philippemilink added a commit to philippemilink/zds-site that referenced this issue Mar 31, 2023
zestedesavoir#6474)"

This reverts commit 2f5f2f0.

Le problème en question
python-social-auth/social-core#773 a été
corrigé dans la version 4.4.1 de social-core.
Situphen pushed a commit to zestedesavoir/zds-site that referenced this issue Apr 2, 2023
#6474)"

This reverts commit 2f5f2f0.

Le problème en question
python-social-auth/social-core#773 a été
corrigé dans la version 4.4.1 de social-core.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants