【问题标题】:LinkedIn OAuth returns unclear errorLinkedIn OAuth 返回不明确的错误
【发布时间】:2015-12-14 20:00:36
【问题描述】:

为响应 oauth 请求,LinkedIn 使用以下参数将用户重定向回我的服务器:

GET /auth/linkedin/callback?error=server_error&error_description=f228ff35d9f7f99ee891ff1e9b056a7a2e4b8429b84de8d7&state=the+authorization+server+encountered+an+unexpected+condition

此外,根据LinkedIn API,error_description 是“总结错误的 URL 编码文本描述。”,这里不是这种情况。

这是原始请求:

https://www.linkedin.com/uas/oauth2/authorization?client_id=************&redirect_uri=https%3A%2F%2Fwww.mydomain.com%2Fauth%2Flinkedin%2Fcallback&response_type=code&scope=r_basicprofile+r_emailaddress&state=cc167e16fcc8039277cae38dc02d08bf526c955ceb403513

如何找出失败的真正原因?

我的堆栈:

  • Rails 4.2.3
  • omniauth 1.2.2
  • omniauth-linkedin-oauth2 0.1.5

【问题讨论】:

  • 如果每次都发生这种情况,您能否提供触发请求的实际代码?
  • 将其添加到问题中

标签: ruby-on-rails oauth oauth-2.0 linkedin omniauth


【解决方案1】:

在许多情况下,可以通过在 LinkedIn 上为您的应用程序生成新的身份验证密钥来解决此问题。

【讨论】:

  • 谢谢,但这无济于事。我想知道为什么 LinkedIn 没有明确说明失败的原因
【解决方案2】:

我们遇到了类似的问题,它是由 LI OAuth 表单上的用户名字段中的尾随空格引起的。

我不确定为什么其他具有 LI Oauth 访问权限的站点上没有发生这种情况,但 LI 的某个人已经能够为我们验证它。这个问题应该很快就会解决(或者我们已经得到承诺)

【讨论】:

    猜你喜欢
    • 2013-08-28
    • 1970-01-01
    • 2011-10-08
    • 2012-05-31
    • 1970-01-01
    • 2018-06-13
    • 2015-06-12
    • 2016-10-06
    • 1970-01-01
    相关资源
    最近更新 更多