question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

500 Error in LinkedIn Oauth2 Workflow

See original GitHub issue

I’m trying to integrate python-social-auth into a Django site so users can login via LinkedIn. I’ve followed the instructions (I hope correctly) and my app correctly sends the user off to LinkedIn to authorise the login.

Once authorised LinkedIn bounces the user back to https://my-site/complete/linkedin-oauth2/?code=..., and social-auth calls https://api.linkedin.com/v1/people/~:(first-name,id,last-name)?format=json to try and get some data for the user.

At this point LinkedIn returns a 500 error. social-auth throws the exception requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://api.linkedin.com/v1/people/~:(first-name,id,last-name)?format=json.

I’ve tried dialing up the logging on social/requests/httplib to DEBUG so all the headers are printed, and while I’m no oauth expert they look appropriate. I wonder if this is a bug at LinkedIn’s end but I’m hesitant to file a report until I know others are running into the same thing.

I’m running:

$ pip freeze | grep social
python-social-auth==0.3.6
social-auth-app-django==2.1.0
social-auth-core==1.6.0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ksuhastercommented, Jan 10, 2018

thank you, eoinof ! I’ve pinned social-auth-core==1.5.0 and it works now

when I “didn’t change anything”, I rebuilt docker container and they have in social-app-django/requirements.txt social-auth-core >= 1.2.0 so I’ve got 1.6.0 after having 1.5.0 and that broke linkedin

0reactions
browniebrokecommented, Jan 12, 2018

I’ve tried to play around the version from the above pull request in my project using social-auth-core, and it seems to work. Thank you @bisby for finding the solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linkedin Login API returning Status 500: Internal Server Error
been stuck for a while trying to implement LinkedIn Login using the passport framework on nodejs with passport-linkedin-oauth2 strategy.
Read more >
How I fixed 500 internal error? - LinkedIn
It was a 500 Internal Error. It means I have a server error. I started to search some information about this error and...
Read more >
Authorization Code Flow (3-legged OAuth) - LinkedIn
The access token for the application. This value must be kept secure as specified in the API Terms of Use. The length of...
Read more >
HTTP 500 Internal Server Error: What It Means & How to Fix It
Learn what an HTTP error 500 is, potential causes for the error, ... This code might show up if your site needs to...
Read more >
Using OAuth 2.0 for Web Server Applications | YouTube Data ...
When you use a Google API Client Library to handle your application's OAuth 2.0 flow, the client library performs many actions that the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found