django


Django-allauth socialaccount provider_login_url has NULL for process, scope and params


I'm using Django 1.10.1 and allauth 0.27.0. I have enabled social network logins for google but have NULL for link parameters.
Configuration:
Settings.py (shortened)
INSTALLED_APPS = [
... skipped ...
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.google',
]
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend',
)
SOCIALACCOUNT_PROVIDERS = {
'google': {
'SCOPE': [
'https://www.googleapis.com/auth/userinfo.profile',
'https://www.googleapis.com/auth/userinfo.email'
],
'AUTH_PARAMS': { 'access_type': 'online' }
}
}
LOGIN_REDIRECT_URL = '/members/'
LOGOUT_URL = '/'
ACCOUNT_AUTHENTICATION_METHOD = 'email'
ACCOUNT_USER_MODEL_USERNAME_FIELD = None
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
ACCOUNT_SIGNUP_PASSWORD_VERIFICATION = True
ACCOUNT_UNIQUE_EMAIL = True
ACCOUNT_USERNAME_REQUIRED = False
SOCIALACCOUNT_QUERY_EMAIL = ACCOUNT_EMAIL_REQUIRED
ACCOUNT_LOGOUT_ON_GET = True
urls.py (shortened)
url(r'^accounts/', include('allauth.urls')),
client id and secret key are also configured on /admin/socialaccount/socialapp/
On login page I have: (shortened)
{% load i18n l10n widget_tweaks account socialaccount staticfiles %}
{% get_providers as socialaccount_providers %}
{% for provider in socialaccount_providers %}
<li>
<a title="{{ provider.name }}" class="socialaccount_provider {{ provider.id }}" href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">{{ provider.name }}</a>
</li>
{% endfor %}
When I hit the login page I see provider's url like:
http://127.0.0.1:8000/accounts/google/login/?process=NULL&scope=NULL&auth_params=NULL
in {{ socialaccount_providers }} I have [<allauth.socialaccount.providers.google.provider.GoogleProvider object at 0x051A6E30>]
What do I wrong?
PS
it's from Google:
Error: invalid_scope
Some requested scopes were invalid. {valid=[https://www.googleapis.com/auth/userinfo.email, https://www.googleapis.com/auth/userinfo.profile], invalid=[NULL]}
I found a problem, its because I overrided base allauth template and inserted another one template inside main, in original template it was:
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
Just replaced
<li>
<a title="{{ provider.name }}" class="socialaccount_provider {{ provider.id }}" href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">{{ provider.name }}</a>
</li>
for
<li>
<a title="{{ provider.name }}" class="socialaccount_provider {{ provider.id }}" href="{% provider_login_url provider.id process="login" %}">{{ provider.name }}</a>
</li>
scope=NULL&auth_params=NULL is doesn't matter here.

Related Links

Editing Django models, with existing objects?
Cookies causing django crash when upgrading from 1.3 to 1.4
getting distinct values from inputs that share the same name
Celery with Django and MongoDB (mongoengine)
How to delete a lot of objects from database
How to use image field in Django unit test
Django and radio buttons
django i18n translation not working on nginx but works on runserver
Django Form won't render
Django: Permissions granted to auth user but not there in view / template?
How do I reset the django cache for static file names?
Apache HTTP Basic Auth - 401 error after supplying username and password
Unable to load require.config dependency when using with Django
How i can show list of objects that have no related object?
Using mixins in class based view - Django
Can I specify a multiline context variable/parameter when {% include %}ing a template?

Categories

HOME
assembly
themes
appcelerator
soa
dojo
visual-studio-emulator
jetty
iis-6
webix
lanczos
text-mining
cmdb
ipmitool
digital-signature
asp.net-core-webapi
poedit
event-store
flask-sqlalchemy
jquery-callback
dynamically-generated
opentk
mat
outliers
exchangewebservices
tizen-tv
carrierwave
vex
twiml
google-cast
dotspatial
send
dumpbin
catch-unit-test
gnat-gps
classcastexception
arduino-ide
hivemq
wurfl
sessionstorage
android-augmented-reality
branching-and-merging
puredata
globalize
gpg-signature
rmongo
smartfoxserver
cronexpression
redistributable
centrifuge
rspec2
delta
refinerycms
lua-telegram-bot
nullable
piracy-prevention
maybe
state-restoration
dllimport
extjs-grid
.bash-profile
sapscript
finalbuilder
graphics2d
dnssec
cwrsync
ms-access-2000
entity-framework-4.3
document-repository
create.js
cuba
ray
draw2d-js
mutual-authentication
clickbank
multitasking
code-duplication
workitem
octal
server-administration
sqlclr
extreme-programming
web-farm
subproject
cgimage
update-statement
load-time
rowlex
django-piston
filesystemobject
mathematical-notation
asynchronous-wcf-call
flvplayback
change-management

Resources

Encrypt Message