Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Fix linkedin #16

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open

Fix linkedin #16

wants to merge 29 commits into from

Conversation

gadelkareem
Copy link

Upgrade Linkedin API and retrieve email address correctly since V1 disallows email address retrieval.

drivers/linkedin.go Show resolved Hide resolved
drivers/linkedin.go Outdated Show resolved Hide resolved
@gadelkareem
Copy link
Author

@danilopolani any updates?

@danilopolani
Copy link
Owner

Ehy, sorry I'm a loot busy in this time due to my work. Anyway I was looking at the code, I remember that to retrieve the profile picture URL was a bit tricky in V2, did you test it?

Ref: https://docs.microsoft.com/en-us/linkedin/shared/references/v2/profile/profile-picture?context=linkedin/consumer/context

@gadelkareem
Copy link
Author

Ehy, sorry I'm a loot busy in this time due to my work. Anyway I was looking at the code, I remember that to retrieve the profile picture URL was a bit tricky in V2, did you test it?

Ref: https://docs.microsoft.com/en-us/linkedin/shared/references/v2/profile/profile-picture?context=linkedin/consumer/context

Yeah I tried to implemented but it looked complicated and will require extra API calls so I dropped it.

@danilopolani
Copy link
Owner

Ok, but then we can't merge this because we would not guarantee the same output as before. If someone uses the avatar field to store the picture URL and updates the app with this PR, his app would break for sure

@gadelkareem
Copy link
Author

@danilopolani
Copy link
Owner

Yeah, but it can't be an empty field if before it was not, otherwise it's a breaking change

@gadelkareem
Copy link
Author

Yeah, but it can't be an empty field if before it was not, otherwise it's a breaking change

If the field still exists then it is not a breaking change because it will not panic. It could also be a user without an avatar so it could already be empty.

@danilopolani
Copy link
Owner

Ok, but imagine this flow:

My app implements a "Sign in with LinkedIn" feature; when a user clicks on the button and I receive the callback, I always update his avatar to have it up-to-date.
I update Gocialite with this PR.
Users keep logging in with LinkedIn, but their profile pictures start disappearing. What's happening?

Maybe it would not be a "breaking" for the panic itself, but for a regular flow and the data consistency. I hope you got the point from the example above

@gadelkareem
Copy link
Author

Ok, but imagine this flow:

My app implements a "Sign in with LinkedIn" feature; when a user clicks on the button and I receive the callback, I always update his avatar to have it up-to-date.
I update Gocialite with this PR.
Users keep logging in with LinkedIn, but their profile pictures start disappearing. What's happening?

Maybe it would not be a "breaking" for the panic itself, but for a regular flow and the data consistency. I hope you got the point from the example above

Well currently the user does not get an email because of the new restriction linkedin added to the retired API so it is already broken in this sense.

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

Successfully merging this pull request may close these issues.

2 participants