Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpauthService.php redirect method does not respect $oauth_callback parameter #9

Open
maksimluzik opened this issue Nov 25, 2015 · 1 comment

Comments

@maksimluzik
Copy link

When using custom redirectAndReturnAction there seems to be an issue, that redirect function does not respect the oauth_callback parameter. Also this causes a problem when trying to pass a custom parameter from example Google login (state parameter). I does not get passed.

The url is for example following:

/authenticate/opauth/login/google/oauth2callback?state=custom_message&code=3523532

state parameter does not get passed to callbackAction function

        $provider = $this->params()->fromRoute('provider');
        $oauth_callback = $this->params()->fromRoute('oauth_callback');

        /** @var \LfjOpauth\Service\OpauthService $opauth_service */
        $opauth_service = $this->getServiceLocator()->get('opauth_service');

        // set custom login and callback routes
        $opauth_service->setLoginUrlName('custom_lfjopauth_login');
        $opauth_service->setCallbackUrlName('custom_lfjopauth_callback');

        return $opauth_service->redirect($provider, $oauth_callback);
@lorenzoferrarajr
Copy link
Owner

Hi @mxmz- I'll try to check this asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants