【发布时间】:2012-12-31 14:52:35
【问题描述】:
我们使用 Web 服务器身份验证流程实现了 OAuth 2.0。它在 10 月/ 11 月运行良好,但突然停止运行。每当我们尝试授权另一个客户端时,服务器都会返回 (400) 带有正文的错误请求
{"error":"unsupported_grant_type","error_description":"grant type not supported"}
grant_type 设置为授权码,绝对有效。
OAuth 突然停止工作有什么原因吗?
这就是我们实施 OAuth 的方式:
Salesforce 提示用户登录他们的帐户。
一旦用户通过身份验证,Salesforce 调用 Callback.aspx,Callback.aspx 代表客户端请求刷新令牌,方法是向:https://login.salesforce.com/services/oauth2/token 发出 POST 请求,负载:
grant_type=authorization_code&code=blah.code&client_id=blah.Id&client_secret=11111111&redirect_uri=https://domain.com/Web/Salesforce/Callback.aspx
内容类型肯定是:application/x-www-form-urlencoded
【问题讨论】:
-
查看我在这个问题上提供的详细答案:stackoverflow.com/questions/12794302/…
标签: salesforce oauth-2.0