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

Parallelize profile requests #1

Merged

Conversation

stavros-wb
Copy link

@stavros-wb stavros-wb commented Apr 24, 2019

When a client has requested the r_emailaddress scope from LinkedIn, then
we do one more request. Instead of firing the requests sequentially we should
make both of them at the same time and merge them upon their responses.

These requests take aprox. 1 second when run sequentially, so half a
second when they're run in parallel

When a client has requested the `r_emailaddress` scope from LinkedIn, then
we do one more request. Instead of firing the requests sequentially we should
make both of them at the same time and merge them upon their responses.

These requests take aprox. 1 minute when run sequentially, so half a
minute when they're run in parallel
@SokratisVidros
Copy link
Owner

Looking good!

@SokratisVidros SokratisVidros merged commit 211b831 into SokratisVidros:master May 13, 2019
@cigolpl
Copy link

cigolpl commented May 27, 2019

I couldn't find an issue section in repo so writing here because topic is related.
I have a problem with obtaining email address in upgraded Linkedin API even if I am using "r_emailaddress" scope. What I get is "photos", "displayName", "provider", "name", "id".

Once I was using https://github.com/jaredhanson/passport-linkedin with older Linkedin API everything was fine.

Any idea what's the cause ?

@SokratisVidros
Copy link
Owner

@cigolpl Please make sure that your app has r_emailaddress scope enabled. You can look for that in Permissions section located at https://www.linkedin.com/developers/apps/YOUR_APP_ID_GOES_HERE/auth.

Apart from that, we have also noticed sporadically that for some profiles Linkedin will never return the email even if everything is configured as expected. We've repeatedly tried to troubleshoot that, reached out to Linkedin and reverse engineer any Linkedin profile privacy setting that might be related without success. That is, I'd suggest you also try with two different profiles to see if the problem is resolved.

Hope that helps.

For the records, Issues section has also been enabled.

@stavros-wb stavros-wb deleted the parallelize_profile_requests branch May 27, 2019 12:28
@cigolpl
Copy link

cigolpl commented May 27, 2019

@SokratisVidros it's working now. I've added scope and state to LinkedinStrategy params. Before I had profileFields instead of scope.

Thanks for help and that lib. It's huge time saver

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

Successfully merging this pull request may close these issues.

None yet

3 participants