Linkedin OAuth pictureUrl导致500错误 [英] Linkedin OAuth pictureUrl leading to a 500 error

查看:106
本文介绍了Linkedin OAuth pictureUrl导致500错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

直到今天早上,在过去的两年中,我使用的Linkedin Oauth系统均未遇到任何问题.我可以验证所有数据仍在传递,但是突然,返回的数据的pictureUrl参数出现了一个非常奇怪的问题.它不再导致图像,而是导致页面如下:

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.

推荐答案

问题似乎是,当OAuth客户端请求的字段超出了应用程序所允许的范围时,LinkedIn OAuth API返回500错误.可以通过指定特定的字段和范围来解决.

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.

最近在GitHub上进行的讨论( https://github.com/auth0/passport-linkedin-oauth2/issues/24 ),指定特定的profileFieldsscope:

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"]
}

这篇关于Linkedin OAuth pictureUrl导致500错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆