this is the error i am getting
400. That’s an error.
Error: invalid_request
Invalid parameter value for approval_prompt: 'auto'' is not valid
Request Details
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'
here is the config for google login
$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);
i tried setting…
Top comments (4)
Welcome to DEV.
Although the community is usually happy to help (see the #help tag), we recommend posting more than just an embedded StackOverflow question. We don't want DEV to become a heap of links. ;)
From the Terms of Use:
After editing your post, I also recommend adding some tags, especially for the related technologies. It'll help your post get noticed.
Thanks, and welcome!
Thanks ,I will try my best to post according to the rules.
Your prompt appears to be set to
auto'
with an extra single quote. Have you tried removing it or adding a matching opening quote?I tried to set prompt to many other values like consent, force,select_accept but nothing worked