omniauth-linkedin-oauth2 icon indicating copy to clipboard operation
omniauth-linkedin-oauth2 copied to clipboard

Failing to get /me

Open mmahalwy opened this issue 6 years ago • 5 comments

E, [2019-02-07T23:56:35.544889 #45219] ERROR -- omniauth: (linkedin) Authentication failure! invalid_credentials: OAuth2::Error, :
{"serviceErrorCode":100,"message":"Not enough permissions to access: GET /me","status":403}

mmahalwy avatar Feb 08 '19 08:02 mmahalwy

@mmahalwy You need to request permissions from LinkedIn. https://business.linkedin.com/marketing-solutions/marketing-partners/become-a-partner/marketing-developer-program

killondark avatar Feb 21 '19 16:02 killondark

or use without scope:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :linkedin, ENV['LINKEDIN_KEY'], ENV['LINKEDIN_SECRET']
end

killondark avatar Feb 21 '19 17:02 killondark

I am also facing the same error with version - (1.0.0) of this gem. Please help anyone. For the detail issue - https://stackoverflow.com/questions/62714338/linkedin-omniauth-gem-omniauth-linkedin-oauth2-giving-authentication-failure

Piyush-Chaudhary avatar Jul 04 '20 17:07 Piyush-Chaudhary

Remove scope or field both and try this:

config.omniauth :linkedin, ENV['LINKEDIN_CLIENT_ID'], ENV['LINKEDIN_CLIENT_SECRET']

Sakshi1305 avatar Jul 08 '20 07:07 Sakshi1305

Mohamed El Mahallawy, @decioferreira how can we solve this issue, I am having same error, I have used devise (ominiauthable), omniauth-linkedin, omniauth-linkedin-oauth2

MY config file devise.rb -

config.omniauth :linkedin, LINKEDIN_APP_KEY, LINKEDIN_APP_SECRET, scope: 'r_liteprofile r_emailaddress'

Please help,

Everthing work fine it redirected to failure mathod and the reason is -

omniauth: (linkedin) Authentication failure! invalid_credentials: OAuth2::Error.

utkarsh-maropost avatar Feb 05 '21 03:02 utkarsh-maropost