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

Adding "api_version" and "fields" options for Linkedin's provider #167

Merged
merged 2 commits into from
Mar 25, 2019

Conversation

Sicaa
Copy link
Contributor

@Sicaa Sicaa commented Mar 20, 2019

Hi,

I ran into some issues implementing Linkedin OAuth, basically because:

  1. Linkedin is switching from v1 to v2 of their APIs, and there is no way to specify version to use from this bundle. Since all new Linkedin API project cannot use v1, OAuth is unusable with this bundle. PHPLeague oauth2-linkedin provider provide a withResourceOwnerVersion() method since 4.1.0 to set version to use, and I'm planning to submit a PR with this feature in this repo, but said that, I must take one thing at a time :)

  2. In conjunction of their version upgrade, Linkedin enforced their policy, and some of the default fields retrieved from PHPLeague provider are now forbidden without requesting developer authorization, so after authentication, it's all 403 responses (=> "Not enough permissions to access: GET /me"). Furthermore, fields that are still available from v1 to v2 changed names ("first-name" becomes "firstName" for example). Fortunately, PHPLeague Linkedin provider allows to overload retrieved fields, so here is my PR!

If you have any suggestions, do not hesitate since I'm new to open-source contributions ;)

@Sicaa
Copy link
Contributor Author

Sicaa commented Mar 20, 2019

Finally I was able to make the changes for API version today and I thought it would be easier to review in the same PR, so here it is!

@Sicaa Sicaa changed the title Adding "fields" option for Linkedin's provider Adding "api_version" and "fields" options for Linkedin's provider Mar 20, 2019
@weaverryan
Copy link
Member

This looks great! Thanks for the detailed outline and great PR!

@weaverryan weaverryan merged commit f0f1056 into knpuniversity:master Mar 25, 2019
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.

2 participants