2

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

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

我将项目部署到 Google 应用引擎。如果我点击“谷歌登录”,它会重定向到需要用户输入密码的页面。之后它向我显示错误,例如“AuthFailed at /complete/google-oauth2/ Authentication failed: ('Connection aborted.', error(13, 'Permission denied'))”

调试消息显示“request_access_token”生成上述问题。

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

任何形式的帮助将不胜感激。

4

1 回答 1

0

将requests模块降级到 2.3 对我有用:

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

感谢这个答案

于 2014-12-10T18:52:48.040 回答