Skip to content

Map alternate scope names in addScopes #599

Open

Description

@stuartmorgan-g

Describe the bug
When calling addScopes, the check against the existing granted scopes doesn't normalize the names. If the core scopes are passed in using their short names (email, openid, profile), the SDK will prompt unnecessarily, because the granted scopes appear to use the v2 names.

Obviously this can be easily worked around from the client side by not making that call in the first place, but it creates some unexpected complexity in the Flutter wrapper (see flutter/flutter#184872), which has to bridge across the iOS, Android, and Web sign in APIs (which are all quite different). We can work around it at the wrapper level, but it would be nice if the SDK handled this name mismatch internally.

To Reproduce
Steps to reproduce the behavior:

  1. Sign in.
  2. Call addScopes:... with [@"email", @"openid", @"profile"] as the scopes.
  3. See a user prompt.

Expected behavior
Receive kGIDSignInErrorCodeScopesAlreadyGranted, since AFAICT signing in grants those scopes automatically, but under different names.

Activity

  1. added
    bugSomething isn't working
    triageIssues that need to be triaged
    on Apr 13, 2026
  2. brnnmrls commented on Apr 13, 2026

    @brnnmrls
    Member

    Thanks for bringing this to our attention! You make a great point. I see how this is confusing and can be enhanced.

    We'll keep this issue open for now and triage it for our backlog so we can look into adding this in a future release once bandwidth clears up on our end. In the meantime, thanks for finding a workaround on your end!

  3. self-assigned this
    on Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions