尝试从授权码获取访问令牌时出现错误500 [英] Getting error 500 when trying to obtain access token from authorization code

查看:592
本文介绍了尝试从授权码获取访问令牌时出现错误500的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这个问题过于具体之前,我先引用官方的 Google OAuth组:

Before this question gets closed as too specific I quote from the official Google OAuth Group:

自2013年3月4日起,关于该小组的讨论已移至google-oauth 标签上的堆栈溢出

As of March 4, 2013, discussion on this group has move to google-oauth tag on Stack Overflow

我们支持Google OAuth2 on Stack Overflow.谷歌工程师 监视并回答google-oauth标签.你应该用这个 提问时标记.

We support the Google OAuth2 on Stack Overflow. Google engineers monitor and answer against the tag google-oauth. You should use this tag when asking questions.

从今天早上开始(2014-07-18),当我尝试使用先前从Google令牌端点获取的授权代码来获取访问令牌时,我的一些用户会收到错误500内部服务器错误以及有效负载{ "error" : "internal_failure" }

Starting this morning (2014-07-18) some of my users are getting error 500 Internal Server error with payload { "error" : "internal_failure" } when trying to obtain an access token using a previously obtained authorization code from Google's token endpoint: https://accounts.google.com/o/oauth2/token.

希望一些监视google-oauth标签的Google工程师能够提供更多见解.

Hopefully some Google engineer monitoring the google-oauth tag here would be able to provide more insight.

推荐答案

500内部服务器错误是Google方面或防洪方面的一个小问题.通常可以通过在实施指数补偿.

500 Internal Server error is a hiccup on googles side or flood protection. Its normally resolved by sending the same request again while implementing exponential backoff.

我感到奇怪的是,该请求来自Oauth服务器,这使我认为当时服务器可能已关闭.重新发送请求应该可以解决问题.

I find it strange that the request was from the Oauth servers which would make me think maybe the servers were down at the time. Resending the request should solve the problem.

处理500或503个响应

Handling 500 or 503 responses

在重负载或更大负载时可能会导致500或503错误 复杂的请求.对于较大的请求,请考虑为 时间较短.还可以考虑实现指数补偿. 这些错误的发生频率可能​​取决于视图(配置文件) 与该视图相关的报告数据量;一个问题 导致一个视图(配置文件)出现500或503错误的结果不会 必然会导致同一查询具有不同视图的错误 (配置文件).

A 500 or 503 error might result during heavy load or for larger more complex requests. For larger requests consider requesting data for a shorter time period. Also consider implementing exponential backoff. The frequency of these errors can be dependent on the view (profile) and the amount of reporting data associated with that view; A query that causes a 500 or 503 error for one view (profile) will not necessarily cause an error for the same query with a different view (profile).

这篇关于尝试从授权码获取访问令牌时出现错误500的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆