Reputation: 590
I've cloned my working Django app into a Debian based Linux distribution, I've installed all dependencies, but when trying to login with email and password or with Google account it throws me the following error:
ImportError: Module "social_core.backends.google" does not define a "GoogleOpenId" attribute/class
I have the following dependencies for authentication:
django-allauth==0.42.0
django-rest-auth==0.9.5
google-auth==1.27.0
oauthlib==3.1.0
requests-oauthlib==1.3.0
social-auth-app-django==3.1.0
social-auth-core==4.0.3
It was working well in Ubuntu and MacOs, the problem appeared when cloning to this Debian Based Distro. Google says nothing about this error and I don't know where to start searching, the only thing I've found is that we are using it as an Authentication backend:
AUTHENTICATION_BACKENDS = (
'social_core.backends.open_id.OpenIdAuth',
'social_core.backends.google.GoogleOpenId',
'django.contrib.auth.backends.ModelBackend'
)
Upvotes: 3
Views: 2934
Reputation: 590
Thanks to the comment below, which explains python-social-auth deprecation, I've solved the issue by downgrading social-auth-core
package from version 4.0.3
to 3.3.3
:
Upvotes: 3
Reputation: 23084
GoogleOpenID is no longer in use, so it was removed from python-social-auth. But they must have forgotten to update the docs.
https://github.com/python-social-auth/social-core/issues/472
https://github.com/python-social-auth/social-docs/issues/65
Upvotes: 0