Redirect always goes to redirect URI (not the define callback URL) #14

arirasekh opened this Issue Apr 4, 2012 · 1 comment


None yet
2 participants

Hi - The following code in the Provider.php constructor obtains the call URL if the parameter is passed in:
isset($options['callback']) and $this->callback = $options['callback'];

However, a few lines later the redirect URL is set to the URL of the page where the user initiated the auth request:
$this->redirect_uri = site_url(get_instance()->uri->uri_string());

That redirect URL is passed to the provider and the callback URL appears never to be used. Replacing the first line I cited with the below seems to solve the issue. Am I right here?

    $this->redirect_uri = site_url(get_instance()->uri->uri_string()); //this line must be moved up above if statement from below

    if(isset($options['callback']) and $this->callback = $options['callback'])
        $this->redirect_uri = $this->callback;      

philsturgeon commented Nov 18, 2012

Can you send this is as a pull request if it is not already taken care of? Thanks!

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