I am trying to integrate Google login in my website ..I am following this example: https://developers.google.com/identity/sign-in/web/
I followed http://www.marinamele.com/user-authentication-with-google-using-django-allauth as well,
I generated client id for my project and replaced it in above code, my settings.py is as follows:
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend',
)
SITE_ID = 1
ACCOUNT_USERNAME_REQUIRED = False
ACCOUNT_EMAIL_VERIFICATION = "none"
LOGIN_REDIRECT_URL = '/'
SOCIALACCOUNT_QUERY_EMAIL = True
SOCIALACCOUNT_PROVIDERS = \
{
'google': {
'SCOPE': ['profile','email'],
'AUTH_PARAMS': {'auth_type': 'reauthenticate', 'access_type':'online'},
'METHOD': 'oauth2',
'VERIFIED_EMAIL': False
}
}
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, "templates")],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.debug',
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.static',
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages',
# Required by allauth template tags
"django.core.context_processors.request",
# allauth specific context processors
"allauth.account.context_processors.account",
"allauth.socialaccount.context_processors.socialaccount",
],
},
},
]
I keep getting this error upon login from my page:
404: That’s an error.
Error: invalid_request
Permission denied to generate login hint for target domain.