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?
在.htaccess文件中添加以下行可解决此问题:
php_value arg_separator.output &
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.