Social_core.exceptions.MissingBackend: Missing backend "google-oauth2" entry in Django with Google OAuth2

I'm working on integrating Google OAuth2 in my Django REST Framework project using django-rest-framework and social-django. However, when I try to authenticate using the endpoint: GET /api/o/google-oauth2/?redirect_uri=http://localhost:3000/auth/google

I get the following error:

social_core.exceptions.MissingBackend: Missing backend "google-oauth2" entry

What could be causing the Missing backend "google-oauth2" entry error? Am I missing any configuration, or could there be an issue with the library versions? Any help or guidance would be appreciated.

Added the following to my settings.py:

AUTHENTICAION_BACKEN,DS =[
    'django.contrib.auth.backends.ModelBackend',
    'social_core.backends.google.GoogleOAuth2',
    'social_core.backends.facebook.FacebookOAuth2',
 ]
SOCIAL_AUTH_GOOGLE_OAUTH2_SCOPE = [
    'openid',
    'https://www.googleapis.com/auth/userinfo.email',
    'https://www.googleapis.com/auth/userinfo.profile',
 ]

The redirect_uri (http://localhost:3000/auth/google) matches the one registered in the Google API Console.

Вернуться на верх