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;
}
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?