-
-
Notifications
You must be signed in to change notification settings - Fork 570
Add passing tests for linkedin OAuth updates #950
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
Add passing tests for linkedin OAuth updates #950
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #950 +/- ##
==========================================
+ Coverage 77.77% 77.91% +0.13%
==========================================
Files 347 347
Lines 10606 10673 +67
Branches 699 503 -196
==========================================
+ Hits 8249 8316 +67
+ Misses 2200 2198 -2
- Partials 157 159 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
The failing tests are affected by gabrielfalcao/HTTPretty#484, but as they pass on 3.8 I assume this is safe to merge. |
|
@nijel I would like to suggest to release such changes as major version bumps. I understand that this change is needed for new apps to work. However, this change also killed OAuth with our old linkedin app. Is there any information available, how to transition old apps to this new flow? What settings have to be adjusted? This is our config that now breaks all caused by a patch version bump which IMO is utterly wrong. M$ so far has not forced us to do anything. SOCIAL_AUTH_LINKEDIN_OAUTH2_SCOPE = ['r_liteprofile', 'r_emailaddress']
SOCIAL_AUTH_LINKEDIN_OAUTH2_FIELD_SELECTORS = ['emailAddress', 'profilePicture(displayImage~:playableStreams)']
SOCIAL_AUTH_LINKEDIN_OAUTH2_EXTRA_DATA = [
('id', 'id'),
('firstName', 'first_name'),
('lastName', 'last_name'),
('emailAddress', 'email_address'),
('profilePicture', 'profile_picture'),
] |
|
Sorry, I didn't realize that this would be a breaking change, I considered it a fix for an API change. Unfortunately I have no knowledge of LinkedIn APIs.... |
| ACCESS_TOKEN_METHOD = "POST" | ||
| REDIRECT_STATE = False | ||
| DEFAULT_SCOPE = ["r_liteprofile"] | ||
| DEFAULT_SCOPE = ["email", "profile", "openid"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These scopes are for OpenID Connect, not OAuth2. We shouldn't make such changes in LinkedinOAuth2 class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r_liteprofile was not working, see #922
This is a follow-up to and addition onto #915
All that the preceding PR includes is part of it, plus tests passing. Props to @MohamedAhmed412000 for the initial work
It'll supersede #915 and #934