python-social-auth 不能使用 GoogleOAuth2
python-social-auth can't use GoogleOAuth2
我使用 Django
移动客户端框架构建了后端,我使用 python-social-auth
注册用户,它适用于 Facebook
和 Twitter
但失败 google-oauth2
,出现以下错误:
{"detail":"{\n \"error\": {\n \"errors\": [\n {\n \"domain\": \"usageLimits\",
\n \"reason\": \"dailyLimitExceededUnreg\",
\n \"message\": \"Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.\",
\n \"extendedHelp\": \"https://code.google.com/apis/console\"\n }\n ],
\n \"code\": 403,
\n \"message\": \"Daily Limit for Unaut henticated Use Exceeded. Continued use requires signup.\"\n }\n}\n"}
我调试了社交包中的 google 后端源代码,我发现它在 return
语句上失败:
return self.get_json(url, params={ 'access_token': access_token, 'alt': 'json' })
我不知道为什么会失败,感谢任何解决此问题的帮助。
首先感谢大家的帮助。
最后我发现问题是由于使用了错误的访问令牌。我使用此 link http://developers.google.com/oauthplayground 并在 google api 列表中选择 google+ 并在生成密钥后我将其与访问令牌交换以获得我的 google+ 访问令牌,当我 运行 curl 在我的 python 视图 url 上命令时,它就像一个魅力。
如果有人遇到同样的问题并需要更多帮助,可以问我,我会解释更多...
我使用 Django
移动客户端框架构建了后端,我使用 python-social-auth
注册用户,它适用于 Facebook
和 Twitter
但失败 google-oauth2
,出现以下错误:
{"detail":"{\n \"error\": {\n \"errors\": [\n {\n \"domain\": \"usageLimits\",
\n \"reason\": \"dailyLimitExceededUnreg\",
\n \"message\": \"Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.\",
\n \"extendedHelp\": \"https://code.google.com/apis/console\"\n }\n ],
\n \"code\": 403,
\n \"message\": \"Daily Limit for Unaut henticated Use Exceeded. Continued use requires signup.\"\n }\n}\n"}
我调试了社交包中的 google 后端源代码,我发现它在 return
语句上失败:
return self.get_json(url, params={ 'access_token': access_token, 'alt': 'json' })
我不知道为什么会失败,感谢任何解决此问题的帮助。
首先感谢大家的帮助。 最后我发现问题是由于使用了错误的访问令牌。我使用此 link http://developers.google.com/oauthplayground 并在 google api 列表中选择 google+ 并在生成密钥后我将其与访问令牌交换以获得我的 google+ 访问令牌,当我 运行 curl 在我的 python 视图 url 上命令时,它就像一个魅力。 如果有人遇到同样的问题并需要更多帮助,可以问我,我会解释更多...