我正在尝试使用混合身份验证在我的laravel应用程序中添加Google身份验证。
Google身份验证配置:
<?php
return array(
"base_url" => "https://mywebsite.com/gauth/auth",
"providers" => array(
"Google" => array(
"enabled" => true,
"keys" => array(
"id" => "myid.apps.googleusercontent.com",
"secret" => "mysecret"
),
"scope" => "https://www.googleapis.com/auth/userinfo.email "
)
)
);
身份验证在http网站上运行良好。但是,当我向网站添加SSL / https时,它无法正常工作,我收到以下错误:
Exception in Auth.php line 169:
User profile request failed! Google returned an error: exception 'Exception' with message 'The Authorization Service has return: invalid_request' in /project/httpdocs/vendor/hybridauth/hybridauth/hybridauth/Hybrid/thirdparty/OAuth/OAuth2Client.php:84
导致此错误的问题是什么?
答案 0 :(得分:0)
我认为该错误是由PHP版本引起的。 PHP版本高于Hybrid Auth。
的推荐值使用Google PHP库并且工作正常。 https://developers.google.com/api-client-library/php/auth/web-app