Python social auth: Google login error: invalid_client

I am using python social auth to implement google login in my application. But I get the following error:

Error: invalid_client
The OAuth client was not found.

I tried adding the product name in the same way as my project name and email address. But I still get this error

My uri redirect in google developer console:

 http://localhost:8000/complete/google-oauth2/ 

login.html

a href="{% url 'social:begin' 'google-oauth2' %}?next={{ index }}"> | Login with Google</a>

settings.py

AUTHENTICATION_BACKENDS = (
    'social.backends.facebook.FacebookOAuth2',
    'social.backends.twitter.TwitterOAuth',
    'social.backends.google.GoogleOAuth2',
    'django.contrib.auth.backends.ModelBackend',
)

SOCIAL_AUTH_GOOGLE_OAUTH_KEY = ''

SOCIAL_AUTH_GOOGLE_OAUTH_SECRET = ''
+4
source share
1 answer

The proper names of the variables in the file settingsshould be:

SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = ''
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = ''
+5
source

All Articles