Question

I'm using HybridAuth 2.1.2 for social logins on my website, realized with Yii Framework.

Facebook works without problems. I got problems with the other logins like Google.

HybridAuth redirects the user to the following URL:

https://accounts.google.com/o/oauth2/auth?client_id=XXXCLIENTIDXXX&redirect_uri=http%3A%2F%2Fwww.XXX.de%2Fsociallogin%3Fhauth.done%3DGoogle&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&access_type=online

If I echo the redirect url in HybridAuth/hybridauth-2.1.2/Hybrid/Providers/Google.php I get this url:

https://accounts.google.com/o/oauth2/auth?client_id=XXXCLIENTXXX&redirect_uri=http%3A%2F%2Fwww.XXX.de%2Fsociallogin%3Fhauth.done%3DGoogle&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&access_type=online

Google.php:

[...]
    echo $this->api->authorizeUrl( $parameters );
    return true;
    Hybrid_Auth::redirect( $this->api->authorizeUrl( $parameters ) ); 
}

The problem is the &-sign I think. Any ideas how to suppress redirect() to generate encrypted URLs?

Was it helpful?

Solution

Adding the following line to .htaccess-file fixed the problem:

php_value  arg_separator.output  &
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top