2

When Social Auth 4.6 and LinkedIn OAuth2 Provider, I am getting an error

State parameter value does not match with expected value.

I am using the following code to connect first time:

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

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

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

And this is the code to get the profile:

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

This works for the first time though, but from next time, it throws an error. Anyone faced any issues similar to this?

Miner
  • 46
  • 3

2 Answers2

2

It is resolved and available in latest socialauth-4.8 version

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

Tarun Nagpal
  • 964
  • 1
  • 9
  • 25
0

I have reported this as a problem here:

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

You can:

  1. fix it by moving config and manager objects to the Application scope;
  2. by fixing GooglePlusImpl.java as defined in issue comment.