Community Management API: Fix for r_basicprofile Scope and Handling OpenID/Profile Scopes in passport-linkedin-oauth2 #103
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.
Description
This pull request addresses an issue related to the
r_basicprofile
scope in thepassport-linkedin-oauth2
repository. The problem arises when the "Community Management API" product is enabled, leading to the unavailability of theopenid
orprofile
scopes. Consequently, thehttps://api.linkedin.com/v2/userinfo
API throws an error under these conditions.Changes Made
openid
orprofile
scopes when the "Community Management API" product is enabled.r_basicprofile
scope. If this scope is added, the profile is now fetched from thehttps://api.linkedin.com/v2/me
endpoint.Context
The LinkedIn API behavior change, particularly when certain products like "Community Management API" are enabled, has been causing errors due to missing scopes. This pull request ensures a robust handling mechanism, ensuring a smooth experience even under such circumstances.
How to Test
openid
orprofile
) using thepassport-linkedin-oauth2
strategy.r_basicprofile
scope is present.Related Issues
Closes: #102
Additional Notes
Please review and merge this pull request at your earliest convenience. If there are any concerns or questions, feel free to reach out. This fix ensures compatibility with the latest LinkedIn API changes, providing a seamless experience for users utilizing the "Community Management API" product.
Thank you for your time and consideration.
Best regards,
Vilas Shetkar