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?

Comments

mkolar created an issue. See original summary.

mkolar’s picture

pick one please... broken_custom_oauth-2560911-2c.patch repairs both...

mkolar’s picture

Status: Active » Needs review

The last submitted patch, 2: broken_custom_oauth-2560911-2.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 2: broken_custom_oauth-2560911-2c.patch, failed testing.

The last submitted patch, 2: broken_custom_oauth-2560911-2b.patch, failed testing.

mkolar’s picture

Version: 7.x-5.x-dev » 7.x-5.8
Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: broken_custom_oauth-2560911-2c.patch, failed testing.

mkolar’s picture

Version: 7.x-5.8 » 7.x-5.x-dev
damienmckenna’s picture

Parent issue: » #2561195: Plan for Twitter v7.x-5.10 release

Yep, there was a regression in just this branch - the others are not affected. Sorry about that.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new1.31 KB
damienmckenna’s picture

Yeah, I borked this in the 7.x-5.x branch when rerolling #940060: Use oauth_callback to pass current domain when authenticating. Sorry.

damienmckenna’s picture

Assigned: mkolar » Unassigned
mkolar’s picture

Thank you!

damienmckenna’s picture

@mkolar: Can you please confirm the patch fixes the problem for you?

mkolar’s picture

Yes. 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.

damienmckenna’s picture

Status: Needs review » Fixed

Committed. Thanks!

  • DamienMcKenna committed bdb7f7e on 7.x-5.x authored by mkolar
    Issue #2560911 by mkolar: Regression to custom OAuth path functionality.
    

Status: Fixed » Needs work

The last submitted patch, 12: twitter-n2560911-12-7.x-5.x.patch, failed testing.

damienmckenna’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.