使用django allauth时无法获取Google登录电子邮件。所有其他数据甚至是个人资料图片

时间:2016-03-08 10:49:26

标签: django django-oscar

使用django allauth时无法获取电子邮件地址。在settings.py中,我包含以下范围

ACCOUNT_USERNAME_REQUIRED = True
ACCOUNT_EMAIL_REQUIRED = True
SOCIALACCOUNT_EMAIL_REQUIRED = False
SOCIALACCOUNT_QUERY_EMAIL = True

SOCIALACCOUNT_PROVIDERS = \
    {
        'google': {
            'SCOPE': ['https://www.googleapis.com/auth/userinfo.profile',
                      'https://www.googleapis.com/auth/userinfo.email'],
            'AUTH_PARAMS': {'access_type': 'online'}
        }
    }

我收到除电子邮件之外的所有其他用户详细信息

1 个答案:

答案 0 :(得分:1)