google-apigoogle-oauthscopesoauth2-playground

How can I configure Google OAuth consent screen to not show checkboxes?


Hi Stackoverflow community,

I'm trying to configure a web app to make use of certain Google scopes. I want the user to either approve all of them or reject all of them.

This is exactly the behavior I do get when playing around with Google OAuth Playground:

Google OAuth Playground

See, I get per each scope a "solid circle" that can not be unchecked. The user either allows access to all listed scopes or denies access to all of them. All at once.

But in my app, each permission is mapped to a popup that can be ALLOWED or DENIED. Plus, at the end, the same consent screen is displayed but with the ability for the user to select/unselect certain permissions. (checkboxes)

Scope 1 Scope 2 Consent Screen

Even though this might sound like more granular I think this is also a little more confusing, plus it extends the logic in my app as I need to double check that permissions to all scopes have been granted. I do need both of them for doing what I need to do, so, only one scope is not useful to me, I might need to re-trigger the grant permission process: which is actually what I'm trying to avoid. I mean, it's OK to deal with the complete denied scenario, but having partial scopes approved is not something I do want to have.

The solution would be to emulate what Google OAuth Playground does.

I've added the scopes explicitly in my consent screen config (which nows figures as under review). But still I do get this behavior.

Which config or param to the oAuth url I might be missing to get that exact behavior?

Thanks!


Solution

  • Turns out that, after adding the specific scopes I needed in:

    https://console.cloud.google.com/apis/credentials/consent/edit?project={YourProjectID}

    enter image description here

    After a while... I started to see the consent screen with solid circles instead of optional checkboxes!