【问题标题】:After user removes application access to his LinkedIn profile, next OAuth2 reauthorization fails用户删除对其 LinkedIn 个人资料的应用程序访问权限后,下一次 OAuth2 重新授权失败
【发布时间】:2014-06-06 05:54:32
【问题描述】:

我正在使用带有 python-social-auth 的 django 应用程序,负责与 Linkedin OAuth2 API 集成。

Linkedin 返回 500 服务器错误:

{
    "error":"server_error",
    "error_description":"the authorization server encountered an unexpected condition : Unable to retrieve access token"
}

重现步骤:

  1. 创建新的 LinkedIn 应用,将 OAuth 2.0 重定向 URL 设置为 http://localhost/complete/linkedin-oauth2/?
  2. 使用 python-social-auth 模块设置 django 应用程序:

    SOCIAL_AUTH_LINKEDIN_OAUTH2_KEY = <API key>
    SOCIAL_AUTH_LINKEDIN_OAUTH2_SECRET = <Secret Key>
    
  3. 在端口 80 上运行 Django 服务器并转到:http://localhost/login/linkedin-oauth2/

  4. 转到Linkedin Settings,选择Groups, Companies & Applications > 查看您的申请,选择您的申请名称并提交删除
  5. 从您的 Django 应用程序中注销用户并重新开始身份验证:http://localhost/login/linkedin-oauth2/

【问题讨论】:

标签: django oauth-2.0 linkedin python-social-auth


【解决方案1】:

LinkedIn 论坛上有关于此问题的 discussion

如果您从 OAuth1 迁移到 OAuth2,显然会发生这种情况。

在他们解决问题之前,建议的补救措施是为我们的应用程序创建一个新的身份验证密钥。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-01-25
    • 2014-07-22
    • 2011-10-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-19
    相关资源
    最近更新 更多