Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] in sample: linkedin-auth: depends on "node-linkedin" library which has been broken for 2 years #845

Open
jkff opened this issue Mar 17, 2021 · 4 comments

Comments

@jkff
Copy link

jkff commented Mar 17, 2021

Which sample has a bug?

linkedin-auth

How to reproduce the issue

Trying to follow the sample as-is hits a bug fixed by #826 . If you apply that PR, then you get a crash in the function exports.token in functions/index.js. The crash can ultimately be traced to the fact that the sample uses the library node-linkedin, which relies for getting user profile data on an API that LinkedIn has stopped providing almost 2 years ago, on May 1 2019:
ArkeologeN/node-linkedin#88

The sample needs to be changed to use an up to date library. I haven't found a replacement library I'm comfortable using yet though.

@jkff jkff added the type: bug label Mar 17, 2021
@liorshk
Copy link

liorshk commented May 2, 2021

Did you find anything?

@jkff
Copy link
Author

jkff commented May 2, 2021

No, I implemented my own code from scratch. Turned out easier than finding a working library.

@jhuleatt
Copy link
Collaborator

jhuleatt commented May 3, 2021

@jkff would you be interested in submitting a PR to update the linkedin-auth sample with your from-scratch code?

@jkff
Copy link
Author

jkff commented May 3, 2021

@jhuleatt Sorry, I don't have time to make a quality PR out of this, and besides, I realized I couldn't use the sample as-is anyway, because my code has a frontend and a backend component, while this sample is frontend-only.

My main learning was that the protocol is just not particularly hard, and you really don't need a library - I spent more time looking for a good library and debugging problems with this sample than it took to implement the protocol myself by reading the LinkedIn OAuth docs https://docs.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow?tabs=HTTPS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants