Adding "api_version" and "fields" options for Linkedin's provider #167
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I ran into some issues implementing Linkedin OAuth, basically because:
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 :)
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 ;)