Active
Project:
Social Auth X (Twitter)
Version:
3.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
21 Jun 2018 at 08:27 UTC
Updated:
11 Aug 2022 at 18:47 UTC
Jump to comment: Most recent
Drupal\social_auth_twitter\TwitterAuthManager does not extend Drupal\social_api\AuthManager\OAuth2Manager as the facebook or google auth manager. Common code that works with social auth regardless of the service needs a common class/interface to work with any auth manager.
Comments
Comment #2
gvsoThe reason for this is that we're using OAuth1 not OAuth2 for Twitter since it didn't have support for OAuth2 until recently. In fact, I'm not sure if Twitter is completely supporting OAuth2 now. I might need to check
Comment #3
manuel.adanIt may be useful to have a common interface that all auth managers implement regardless of the OAuth version they use. Any way, that's out of the twitter auth scope.
Comment #4
gvsoWe could have one but we'll need to think of common functionality among all the authentication protocols.
However, I think what you're interested in is actually to get basic user info and request API endpoints which I think are common things among different protocols. We should be able to create a base interface with those methods and extend it in OAuth2Manager to not break anything.
Comment #5
josebc commentedIm getting some errors that might be related to this
"RuntimeException: Failed to start the session because headers have already been sent"
" LogicException: The controller result claims to be providing relevant cache metadata, but leaked metadata was detected."
in /user/login/twitter
Looking at redirectToProvider in OAuth2ControllerBase you can notice they are handling it somewhat differently
https://git.drupalcode.org/project/social_auth/blob/8.x-2.x/src/Controll...
Comment #6
josebc commentedComment #7
gvsoThat issue is the same as #3033444: LogicException & RuntimeException on user login (which you already referenced). And of course, that patch won't work in Social Auth Twitter since this module does not extend the OAuth2ControllerBase (Twitter uses OAuth 1). However, the error is a completely different issue from this. Could you create a new issue for the error? Also, feel free to submit a patch (you can base your solution on the issue I mentioned).
Comment #8
abu-zakham commentedComment #9
abu-zakham commented@gvso Issue created
Comment #10
wells