I
I
ilyamst512019-06-08 13:52:28
Google
ilyamst51, 2019-06-08 13:52:28

How to customize application rights request screen in Google OAuth 2.0?

Good afternoon!
I have the following problem:
I made an application that requests a number of rights to a user account (audit gmail, configure domain users, etc.). Authentication occurs through a button on the site, the request is generated in php.
And everything seems to be fine and works stably. But on the rights request screen, we see the following picture:
5cfb93fc9cd09305041866.jpeg5cfb93a345919095910568.png
And it should be like this right away:
5cfb93280eb24659694067.png
That is, without small pop-ups. And without the choice to give access or not. We put the user in front of the fact that he will give all the rights that we request.
Who knows how to fix this?
Here is the entire code that generates the auth link for user authorization

$client = new Google_Client();
$client->setAuthConfig($gsuite['json']);
$client->setScopes($gsuite['scopes']);
$client->setAccessType("offline");
$client->setRedirectUri($gsuite['dev_redirect']);
$authUrl = $client->createAuthUrl();
header("Location: ".$authUrl);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question