LinkedIn OAuth returns unclear error
Asked Answered
H

2

8

In response to an oauth request, LinkedIn redirects user back to my server with the following parameters:

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

Moreover, according to LinkedIn API, error_description is "A URL-encoded textual description that summarizes error.", which is not the case here.

Here's the original request:

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

How can I find out the actual reason for the failure?

My stack:

  • Rails 4.2.3
  • omniauth 1.2.2
  • omniauth-linkedin-oauth2 0.1.5
Headwaters answered 17/9, 2015 at 20:1 Comment(2)
If this is happening every time, can you provide the actual code the fires up the request?Something
added it to the questionHeadwaters
G
2

We had a similar issue, and it was caused by a trailing space in the username field on the LI OAuth form.

I'm not sure why it didn't happen on other sites with LI Oauth access, but someone from LI has been able to validate it for us. This issue should be resolved very soon (Or so we've been promised)

Greenburg answered 27/9, 2015 at 9:57 Comment(0)
K
0

In many cases this issue can be resolved by generating a new authentication key for your application on LinkedIn.

Kinnon answered 24/9, 2015 at 2:47 Comment(1)
thanks but this doesn't help. I wonder why LinkedIn are not clearly specifying the failure reasonHeadwaters

© 2022 - 2024 — McMap. All rights reserved.