Closed anibalsanchez closed 1 year ago
Hi, I see consent
does not work. But force
and auto
are working. Are you still facing this issue?
consent
works with $client->setPrompt('consent');
though, lets see if we can edit the documentation page itself (https://developers.google.com/identity/protocols/oauth2/web-server)
@anibalsanchez The correct configuration is to use:
$client->setPrompt('consent');
I have tested this using the simple file upload example and adding the line above to line 40, and I received the prompt as expected and did not receive the "Access Blocked: Authorization Error" you reported, so I believe there was something else incorrect in your calling code when you received this error.
I suggest trying again, and making sure you do not include a value for ApprovalPrompt
, and that the value for Prompt
is "consent"
.
Thanks for your feedback. I'm going to re-test the case.
The same issue remains for all values of the prompt param:
$client->setPrompt('consent');
: Invalid parameter value for prompt: Invalid prompt: consent $client->setPrompt('force');
: Invalid parameter value for prompt: Invalid prompt: force $client->setPrompt('auto');
: Invalid parameter value for prompt: Invalid prompt: auto Please, let me know if there's anything I can test.
@anibalsanchez Is this the latest you are using?
I'm testing with google/apiclient v2.14.0
The library doesn't seem to be the problem. On the server side, it's correctly receiving the parameters and rejecting the prompt values.
Interesting, It was working for me! Could you give me steps you followed to reproduce this issue? (Including the code you used if possible)
It was also working for me in this account. Pls, give me a few days to prepare the code.
Hi,
The client authorization has stopped working with the following:
I have also tried other combinations with the following:
or
In all cases, it returns: Access blocked: Authorization Error Invalid parameter value for ...
According to the documentation,
$client->setApprovalPrompt('consent');
should work. https://developers.google.com/identity/protocols/oauth2/web-server. This is a previous report of similar cases: https://github.com/googleapis/google-api-php-client/issues/1821Environment details
Steps to reproduce
Code example