decioferreira / omniauth-linkedin-oauth2

A LinkedIn OAuth2 strategy for OmniAuth.
MIT License
117 stars 147 forks source link

anyone having Authentication failure? #24

Open Fatman13 opened 10 years ago

Fatman13 commented 10 years ago
(linkedin) Callback phase initiated.
(linkedin) Authentication failure! invalid_credentials: OmniAuth::Strategies::OAuth2::CallbackError, OmniAuth::Strategies::OAuth2::CallbackError

/auth/linkedin took me directly to /auth/failure in dev environment. Not seeing linkedin login page.

ValMilkevich commented 9 years ago

I have it

yossi-shasho commented 9 years ago

+1 this is the params hash I'm getting in the omniauth failure controller action: {"message"=>"server_error", "strategy"=>"linkedin"}. no further explanations. any idea anyone?

ArielAleksandrus commented 8 years ago

I'm getting the same thing. This issue was opened in 2014 and still have no solution?

johan-smits commented 7 years ago

FYI I switched to the omniauth-linkedin gem and this one works.

henricazottes commented 5 years ago

I had the following error:

I, [2019-01-11T12:34:11.289315 #7478]  INFO -- omniauth: (linkedin) Request phase initiated.
I, [2019-01-11T12:34:12.237318 #7478]  INFO -- omniauth: (linkedin) Request phase initiated.
I, [2019-01-11T12:34:17.953765 #7478]  INFO -- omniauth: (linkedin) Callback phase initiated.
E, [2019-01-11T12:34:18.598240 #7478] ERROR -- omniauth: (linkedin) Authentication failure! invalid_credentials: OAuth2::Error, : 
{"serviceErrorCode":100,"message":"Not enough permissions to access: GET /me","status":403}

Just changed my gem from gem omniauth-linkedin-oauth2 to gem 'omniauth-linkedin, ran bundle install and it worked! :)

mmahalwy commented 5 years ago

@henricazottes that is being deprecated no? since it uses v1?

henricazottes commented 5 years ago

Well, I can see that it was supposed to be deprecated but it still works. I managed to switch to oauthv2, the problem the op is describing comes from the scope permissions that are different in v2. I went back to omniauth-linkedin-oauth2 and changed

With those changes everything seems to work :)

mmahalwy commented 5 years ago

@henricazottes I think I will try to squeeze v1 as long as possible!

mmahalwy commented 5 years ago

@henricazottes found a way to get the profile url? Really sucks if there isn't a way to get that info

henricazottes commented 5 years ago

Didn't try :/

GEK62 commented 2 years ago

I fix it using gem omniauth-linkedin-oauth2 1.0.0 and in devise.rb config.omniauth :linkedin, ENV['LINKEDIN_APP_ID'], ENV['LINKEDIN_APP_SECRET'], scope: 'r_liteprofile,r_emailaddress'