这是我得到的错误
400. That’s an error.
Error: invalid_request
Invalid parameter value for approval_prompt: 'auto'' is not valid
Run Code Online (Sandbox Code Playgroud)
请求详细信息
response_type=code
access_type=offline
client_id=xyz-
xyx.apps.googleusercontent.com
redirect_uri=http://localhost/xyz/init/googleCallBack.php
state=scope=https://www.googleapis.com/auth/plus.me
approval_prompt=auto'
Run Code Online (Sandbox Code Playgroud)
这是谷歌登录的配置
$gClient= new Google_Client();
$gClient->setAuthConfig('init/client_secret.json');
$gClient->setApprovalPrompt('consent');
$gClient->setApplicationName('abc');
$gClient->setAccessType('offline');
$gClient>setRedirectUri('http://localhost/xyz/init/googleCallBack.php';
$gClient->setScopes(Google_Service_Plus::PLUS_ME);
Run Code Online (Sandbox Code Playgroud)
我尝试设置了 Approval_prompt 或同时提示两者,但如果我不设置这两个,则它不起作用,我仍然得到无效参数“prompt=auto”