尚未从api返回Linkedin oauth2 r_liteprofile [英] Linkedin oauth2 r_liteprofile not being returned from api

查看:294
本文介绍了尚未从api返回Linkedin oauth2 r_liteprofile的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我有一个Rails应用程序,并且我正在使用 oauth2的宝藏.现在,在Linkedin上的开发人员控制台上,我只能选择

So I have a rails app and I am using this gem for oauth2. Now on the developer's console on linkedin I can only select

r_basicprofiler_emailaddressrw_company_adminw_share.

所以我选择了r_basicprofile.

现在一旦确定将用户推向http://localhost:3000/auth/linkedin/callback?error=unauthorized_scope_error&error_description=Scope+%26quot%3Br_liteprofile%26quot%3B+is+not+authorized+for+your+application&state=126bb5cb16613e67f77580954980f86e4a3080c7cb4e56fe

Now once identified linkedin in pushing the user to http://localhost:3000/auth/linkedin/callback?error=unauthorized_scope_error&error_description=Scope+%26quot%3Br_liteprofile%26quot%3B+is+not+authorized+for+your+application&state=126bb5cb16613e67f77580954980f86e4a3080c7cb4e56fe

这显然是在请求r_liteprofile.现在,由于不允许r_liteprofile,它会给出回调错误

which is clearly requesting r_liteprofile. Now since r_liteprofile is not allowed it gives a callback error

OmniAuth::Strategies::OAuth2::CallbackError

OmniAuth::Strategies::OAuth2::CallbackError

unauthorized_scope_error | Scope "r_liteprofile" is not authorized for your application.

routes.rb看起来像

routes.rb looks like

get 'login-linkedin', to: redirect('/auth/linkedin')

get 'auth/:provider/callback', to: 'sessions#identify_network_entry'

omniauth.rb看起来像

omniauth.rb looks like

provider :linkedin, 'KEY', 'VALUE

回调URL类似于

http://localhost:3000/auth/linkedin/callback

是否有解决方法,或者这是实现缺陷?这种情况偶尔会停止发生,因此我假设我在实现错误.

Is there a workaround or is this an implementation flaw ? This stopped happening sporadically so I am assuming I'm making an implementation error.

推荐答案

今天(1月14日)linkedin转换了他们的文档,并允许在今天之后创建的所有应用程序自动使用自助服务部分下的r_liteprofile,但可以使用您必须将r_basicprofile应用于其合作伙伴计划.

Today (jan 14th) linkedin transitioned their docs and allowed for all applications created after today to automatically be able to use r_liteprofile under the self serve section, but to use the r_basicprofile you'll have to apply to their partner program.

使用r_basicprofile连接到v1 API应该可以,但是只能进行到3月1日.

Connecting to the v1 API with r_basicprofile should work, but only until march 1st.

也许您的问题是由于发生了切换而发生的.

Perhaps your issue was happening because of the switch that took place.

在此处了解更多信息

https://docs.microsoft.com/zh-CN/linkedin/consumer/integrations/self-serve/migration-faq?context=linkedin/consumer/context

截至2019年1月14日,在LinkedIn开发人员平台上创建的所有新应用程序都可以使用LinkedIn的v2 API.

All new applications created on the LinkedIn Developer Platform as of January 14, 2019 can use LinkedIn's v2 APIs.

特别是...

我可以访问哪些权限?

What permissions do I have access to?

LinkedIn v1 API提供了以下权限集:

LinkedIn v1 APIs provided the following set of permissions:

r_basicprofile r_emailaddress w_share rw_company_admin

r_basicprofile r_emailaddress w_share rw_company_admin

向前迈进,可用的v2 API包括:

Moving forward, the available v2 APIs include:

r_liteprofile(代替r_basicprofile) r_emailaddress w_member_social(代替w_share)

r_liteprofile (replaces r_basicprofile) r_emailaddress w_member_social (replaces w_share)

和...

是否要保持对基本配置文件"字段的访问?了解有关申请LinkedIn合作伙伴计划的更多信息.

Looking to maintain access to the Basic Profile fields? Learn more about applying to a LinkedIn Partner Program.

这篇关于尚未从api返回Linkedin oauth2 r_liteprofile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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