RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.58k stars 10.59k forks source link

OAuth: LinkedIn integration broken #10621

Open rudygodoy opened 6 years ago

rudygodoy commented 6 years ago

Description:

Server Setup Information:

Steps to Reproduce:

  1. Administration / OAuth
  2. Expand LinkedIn and enter relevant configuration
  3. Save changes
  4. Logout and try to login using LinkedIn

Expected behavior:

User logged in using her LinkedIn credentials.

Actual behavior:

UI displays "Internal server error" after closing the OAuth login window.

Relevant logs:

[34mI20180429-21:43:02.434(0) Exception while invoking method 'login' Error: Failed to complete OAuth handshake with LinkedIn. Cannot read property 'post' of undefined at getTokenResponse (/app/bundle/programs/server/packages/pauli_linkedin-oauth.js:110:11) at Object.handleOauthRequest (/app/bundle/programs/server/packages/pauli_linkedin-oauth.js:31:18) at OAuth._requestHandlers.(anonymous function) (packages/oauth2.js:27:31) at middleware (packages/oauth.js:194:5) at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40 
andpiazza commented 6 years ago

While we wait for the LinkedIn OAuth issue to be fixed: do we have documentation on what happens from an user and a admin perspective?

In practical terms: I'd like to be able to understand and then guide my users around how their accounts will be created and how to access using LinkedIn.

thanks

rudygodoy commented 6 years ago

@andpiazza if OAuth doesn't work for LinkedIn, then you can do nothing to help your users.

eric-herve commented 6 years ago

I have same problem with :

I have implement linkedin oauth2 in an other service (not a rocketchat) and no problem.

eric-herve commented 6 years ago

Fix is in the commit https://github.com/PoBuchi/pauli-linkedin-oauth/commit/a86e1438af2f90da7eff831fe34c03581875416f but it is not applied in the 0.70.4 docker version.

stevenmcastano commented 5 years ago

Looks like this is still a problem 0.74.3... any updates?

May  1 08:47:59 rocketchat[2618]: Exception while invoking method 'login' { Error: Failed to complete OAuth handshake with LinkedIn. Cannot read property 'post' of undefined
May  1 08:47:59 rocketchat[2618]:     at getTokenResponse (packages/pauli:linkedin-oauth/linkedin-server.js:87:11)
May  1 08:47:59 rocketchat[2618]:     at Object.handleOauthRequest (packages/pauli:linkedin-oauth/linkedin-server.js:5:18)
May  1 08:47:59 rocketchat[2618]:     at OAuth._requestHandlers.(anonymous function) (packages/oauth2/oauth2_server.js:10:33)
May  1 08:47:59 rocketchat[2618]:     at middleware (packages/oauth/oauth_server.js:161:5)
May  1 08:47:59 rocketchat[2618]:     at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
May  1 08:47:59 rocketchat[2618]:   message: 'Failed to complete OAuth handshake with LinkedIn. Cannot read property \'post\' of undefined' }