Hi, i just removed my old patch (https://www.drupal.org/node/2357921 which worked with version 7.x-5.8+72-dev) from profile and installed new version of twitter module (7.x-5.8+100-dev) and my twitter singin stopped working with custom oauth path.
I found where is the problem and I think it does not work now with custom oauth path anywhere.. It always redirects me to the old url twitter/oauth because there is:
twitter.lib.php
public function get_request_token($params = array()) {
...
$oauth_callback = variable_get('twitter_oauth_callback_url', TWITTER_OAUTH_CALLBACK_URL);
...
$params += array('oauth_callback' => url($oauth_callback, array('absolute' => TRUE)));
...
and this is called in twitter_signin.module with $params
function twitter_signin_redirect() {
...
$callback_url = url('twitter/oauth', array('absolute' => TRUE));
$params = array('oauth_callback' => $callback_url);
$token = $twitter->get_request_token($params);
...
the result is that there is always "twitter/oauth" callback. += do not replace oauth_callback key in array .. solution is to change line 107 in twitter_signin.module into
$callback_url = url(variable_get('twitter_oauth_callback_url', TWITTER_OAUTH_CALLBACK_URL), array('absolute' => TRUE));
or maybe += was bad idea and it needs to be change into array_replace or something like this?
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | twitter-n2560911-12-7.x-5.x.patch | 1.31 KB | damienmckenna |
Comments
Comment #2
mkolar commentedpick one please... broken_custom_oauth-2560911-2c.patch repairs both...
Comment #3
mkolar commentedComment #7
mkolar commentedComment #10
mkolar commentedComment #11
damienmckennaYep, there was a regression in just this branch - the others are not affected. Sorry about that.
Comment #12
damienmckennaComment #13
damienmckennaYeah, I borked this in the 7.x-5.x branch when rerolling #940060: Use oauth_callback to pass current domain when authenticating. Sorry.
Comment #14
damienmckennaComment #15
mkolar commentedThank you!
Comment #16
damienmckenna@mkolar: Can you please confirm the patch fixes the problem for you?
Comment #17
mkolar commentedYes. I have installed twitter 5.8+100 with broken_custom_oauth-2560911-2c.patch and it works now. I can try yours but I think it's similar.
Comment #18
damienmckennaCommitted. Thanks!
Comment #21
damienmckenna