Google is currently transitioning their OAuth sign-in flow to granular permissions.
In their recommended approach for Android applications they write:
If you use
auth.api.signin
SDK from Play Services to interact with Google OAuth 2.0, you can userequestPermissions
function to request the smallest set of scopes needed, and thehasPermissions
function to check which scopes the user granted when requesting granular permissions.
However the mentioned auth.api.signin
SDK is deprecated. Replacements are Credential Manager for authentication or Google Identity Services for authorization.
Handling granular permissions with auth.api.signin
SDK seemed pretty straightforward, but in auth.api.identity
I can't find any replacement for the hasPermissions function.
Is there any other way in auth.api.signin
to check which scopes the user granted? Or am I missing something else?