【发布时间】:2014-09-12 22:58:25
【问题描述】:
我正在尝试使用 Django-Allauth 从 Google oauth 获取生日日期,但我做不到。
我读到我必须输入范围“https://www.googleapis.com/auth/plus.me”,但在 extra_data 字段中没有任何反应。
你能帮帮我吗? 谢谢
已编辑: 示例代码:
SOCIALACCOUNT_PROVIDERS = {
'facebook':
{'SCOPE': ['publish_stream', 'email', 'user_birthday', 'user_location'],
'AUTH_PARAMS': {'auth_type': 'https'},
'METHOD': 'oauth2',
'VERIFIED_EMAIL': True},
'google':
#{ 'SCOPE': ['https://www.googleapis.com/auth/userinfo.profile', 'https://www.googleapis.com/auth/userinfo.email',],
{ 'SCOPE': ['https://www.googleapis.com/auth/plus.login', 'https://www.googleapis.com/auth/userinfo.email', 'https://www.googleapis.com/auth/plus.me'],
'AUTH_PARAMS': { 'access_type': 'online' },
} }
在 facebook 上工作,我有新的 extra_data 信息,如生日、性别等。但谷歌没有用新信息填充 extra_data 字段。
【问题讨论】:
-
你试过什么?代码示例?
标签: python django oauth google-oauth django-allauth