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

returnto URL
This commit is contained in:
Zach Copley 2010-10-22 02:08:38 +00:00
parent ac45f661f6
commit 131c339c5a
2 changed files with 9 additions and 2 deletions

View File

@ -379,6 +379,7 @@ class ApiOauthAuthorizeAction extends Action
_('Allow or deny access'));
$this->hidden('token', common_session_token());
$this->hidden('mode', $this->mode);
$this->hidden('oauth_token', $this->oauthTokenParam);
$this->hidden('oauth_callback', $this->callback);

View File

@ -713,8 +713,14 @@ class OpenIDPlugin extends Plugin
require_once dirname(__FILE__) . '/openid.php';
oid_assert_allowed($openid_url);
$returnto = common_local_url('ApiOauthAuthorize', array(),
array('oauth_token' => $action->arg('oauth_token')));
$returnto = common_local_url(
'ApiOauthAuthorize',
array(),
array(
'oauth_token' => $action->arg('oauth_token'),
'mode' => $action->arg('mode')
)
);
common_set_returnto($returnto);
// This will redirect if functional...