Linkedin OAuth pictureUrl results in 500 error

Until this morning, over the past 2 years, I had no problems with the Linkedin Oauth system that I implemented. I can verify that all the data is still passing, but unexpectedly there was a very strange problem with the pictureUrl parameter of the returned data. It no longer leads to an image and instead leads to a page that looks like this:

enter image description here

I can’t understand what went wrong, any advice would be greatly appreciated. All other data goes very well.

+5
source share
1 answer

The problem is that the LinkedIn OAuth API returns a 500 error when the OAuth client requests more fields than the application can request. It can be solved by specifying specific fields and scope.

In this recent discussion on GitHub ( https://github.com/auth0/passport-linkedin-oauth2/issues/24 ) specify specific profileFields and scope :

 { profileFields: [ "formatted-name", "headline", "id", "public-profile-url", "email-address", "location" ], scope: ["r_basicprofile", "r_emailaddress"] } 
+1
source

Source: https://habr.com/ru/post/1274490/


All Articles