【问题标题】:Social Auth - Linked In OAuth 2 Not working社交身份验证 - 链接在 OAuth 2 中不起作用
【发布时间】:2014-10-30 08:50:45
【问题描述】:

当 Social Auth 4.6 和 LinkedIn OAuth2 Provider 时,我收到一个错误

状态参数值与预期值不匹配。

我第一次使用下面的代码连接:

SocialAuthConfig config = SocialAuthConfig.getDefault();
config.load();

manager = new SocialAuthManager();
manager.setSocialAuthConfig(config);

String authenticationURL = manager.getAuthenticationUrl("linkedin2", successURL);

这是获取配置文件的代码:

authMap = SocialAuthUtil.getRequestParametersMap(request);
AuthProvider provider = manager.connect(authMap);
profile = provider.getUserProfile();

虽然这是第一次,但从下一次开始,它会引发错误。 有人遇到过类似的问题吗?

【问题讨论】:

  • 你能从linkedin获取个人资料吗,如果能,你能告诉我怎么做吗?

标签: java oauth linkedin socialauth


【解决方案1】:

我在这里报告了这个问题:

https://github.com/3pillarlabs/socialauth/issues/38

你可以:

  1. 通过将配置和管理器对象移动到应用程序范围来修复它;
  2. 通过修复问题注释中定义的 GooglePlusImpl.java。

【讨论】:

    【解决方案2】:

    在最新的 socialauth-4.8 版本中已解决并可用

    https://sourceforge.net/projects/socialauth/files/latest/download

    【讨论】:

      猜你喜欢
      • 2016-10-20
      • 2023-03-20
      • 2018-06-05
      • 1970-01-01
      • 2015-08-29
      • 2012-08-30
      • 1970-01-01
      • 2019-09-20
      • 1970-01-01
      相关资源
      最近更新 更多