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_basicprofile
, r_emailaddress
, rw_company_admin
and w_share
.
So I have r_basicprofile
selected.
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
which is clearly requesting r_liteprofile
. Now since r_liteprofile
is not allowed it gives a callback error
OmniAuth::Strategies::OAuth2::CallbackError
unauthorized_scope_error | Scope "r_liteprofile" is not authorized for your application
.
routes.rb looks like
get 'login-linkedin', to: redirect('/auth/linkedin')
get 'auth/:provider/callback', to: 'sessions#identify_network_entry'
omniauth.rb looks like
provider :linkedin, 'KEY', 'VALUE
callback url in linkedin console for Oauth2.0 looks like
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.