私は Symfony2 アプリに取り組んでいます。認証を処理するために FOSUserBundle を使用しており、最近、このチュートリアルを使用して FOSUserBundle と統合しました: https://gist.github.com/danvbe/4476697。
問題は、ローカルホストで Google API を使用してログインでき、すべて正常に動作することです。
ただし、実際のサーバーにログインしようとすると、次のようになります。
Error: invalid_request
device_id and device_name are required for private IP: http://<server_ip>/login/check-google
リクエストの詳細:
response_type=code
scope=https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile
redirect_uri=http://<server_ip>/login/check-google
client_id=<my_id>
Google ドキュメントでは、これら 2 つのパラメーターについて言及していません。device_id が UUID で、device_name が「notes」に設定されたリクエストを手動で送信しようとしました。今回頂いた回答は以下の通りです。
Error: invalid_request
Device info can be set only for native apps.
リクエストの詳細:
cookie_policy_enforce=false
response_type=code
device_name=notes
scope=https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile
redirect_uri=http://<server_ip>/login/check-google
device_id=4b3403665fea6
client_id=<my_id>
さて、私は何を間違っていますか?