git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 131c339c authored by Zach Copley's avatar Zach Copley

Pass OAuth authorize page's mode paramater to OpenID plugin so it can create a correct

returnto URL
parent ac45f661
...@@ -379,6 +379,7 @@ class ApiOauthAuthorizeAction extends Action ...@@ -379,6 +379,7 @@ class ApiOauthAuthorizeAction extends Action
_('Allow or deny access')); _('Allow or deny access'));
$this->hidden('token', common_session_token()); $this->hidden('token', common_session_token());
$this->hidden('mode', $this->mode);
$this->hidden('oauth_token', $this->oauthTokenParam); $this->hidden('oauth_token', $this->oauthTokenParam);
$this->hidden('oauth_callback', $this->callback); $this->hidden('oauth_callback', $this->callback);
......
...@@ -713,8 +713,14 @@ class OpenIDPlugin extends Plugin ...@@ -713,8 +713,14 @@ class OpenIDPlugin extends Plugin
require_once dirname(__FILE__) . '/openid.php'; require_once dirname(__FILE__) . '/openid.php';
oid_assert_allowed($openid_url); oid_assert_allowed($openid_url);
$returnto = common_local_url('ApiOauthAuthorize', array(), $returnto = common_local_url(
array('oauth_token' => $action->arg('oauth_token'))); 'ApiOauthAuthorize',
array(),
array(
'oauth_token' => $action->arg('oauth_token'),
'mode' => $action->arg('mode')
)
);
common_set_returnto($returnto); common_set_returnto($returnto);
// This will redirect if functional... // This will redirect if functional...
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment