1

Yii フレームワークで実現された、自分の Web サイトでのソーシャル ログインに HybridAuth 2.1.2 を使用しています。

Facebook は問題なく動作します。Google などの他のログインで問題が発生しました。

HybridAuth は、ユーザーを次の 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

HybridAuth/hybridauth-2.1.2/Hybrid/Providers/Google.php でリダイレクト URL をエコーすると、次の 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 ) ); 
}

問題は & 記号だと思います。redirect() を抑制して暗号化された URL を生成する方法はありますか?

4

1 に答える 1