My app requires google calendar scope but in consent screen this permission is optional and unchecked by default and so many users missed that part.
How can I make it as mandatory scope like this?
This is my code to generate auth url:
$client = new Google_Client();
$client->setApplicationName(config('app_name'));
$client->setScopes([
Google_Service_Calendar::CALENDAR,
'profile',
'email'
]);
$client->setAuthConfig(config('credentials.google'));
$client->setAccessType('offline');
$client->setPrompt('select_account consent');
return $client->createAuthUrl();
Weird thing is that if I remove 'profile' and 'email' scopes it works as I expected but I also need these scopes to get user's email and name during registration.
Also my app is verified by google and other functionality (like reading user's events etc.) works fine.
Closest thread to my question is here. But accepted answer says "Users will have the ability to grant or deny permissions individually."
What is the trick behind the second image?