Until this morning, for the last 2 years I experienced no issues with the Linkedin Oauth system I have implemented. I can verify that all the data is still coming through, but suddenly a very strange issue has come up with the pictureUrl
parameter of the returned data. It no longer leads to an image, and instead leads to a page which looks like this:
I can't figure out what has gone wrong, any advice would be greatly appreciated. All other data is coming through just fine.
The issue seems to be that LinkedIn OAuth API returns a 500 error when the OAuth client asks for more fields than the application is permitted to request. It can be resolved by specifying the specific fields and scope.
Per this recent discussion at GitHub (https://github.com/auth0/passport-linkedin-oauth2/issues/24), specify the specific profileFields
and scope
:
{
profileFields: [
"formatted-name",
"headline",
"id",
"public-profile-url",
"email-address",
"location"
],
scope: ["r_basicprofile", "r_emailaddress"]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With