在Google App Engine上使用python-social-auth进行的Google OAuth2身份验证失败

时间:2014-10-23 10:58:50

标签: python django google-app-engine python-social-auth

我对使用Google OAuth2身份验证的python-social-auth存在问题。 我正在使用django 1.7开发项目并将其部署到Google App Engine。

我在本地环境中使用oauth2和python-social-auth测试了谷歌的登录(Ubuntu,django1.7,virtualenv,python-social-auth) 当然,我从" API和auth"获得了API凭据。控制台。

我将项目部署到Google应用引擎。 如果我点击"通过google"登录,它会重定向到需要用户输入密码的页面。 之后,它显示我的错误,如#34; AuthFailed at / complete / google-oauth2 / 身份验证失败:('连接已中止。',错误(13,'权限被拒绝'))"

调试消息显示" request_access_token"产生上述问题。

但关键是它在本地测试中运行良好而没有任何问题。

任何形式的帮助都会非常感激。

1 个答案:

答案 0 :(得分:0)

请求模块降级为2.3对我有用:

pip uninstall requests        # 2.5.1, then
pip install requests==2.3

感谢Answer