Skip to content

Allow requesting additional scopes via the google_sign_in plugin #50208

Closed

Description

@emerssso

Use case

The GoogleSignIn APIs for Android, iOS, and Web all provide a mechanism to request additional scopes after sign-in. It would be helpful for the google_sign_in plugin to also provide a mechanism to check granted scopes and grant new scopes (i.e. optional scopes or scopes for new features).

Proposal

Offer two new APIs on GoogleSignIn:
Future<bool> hasGrantedScope(String scope); Which indicates if scope has already been granted by currentUser.
Future<bool> requestScope(String scope); Which requests scope be granted by the currentUser.

Activity

  1. emerssso commented on Feb 5, 2020

    @emerssso
    ContributorAuthor

    I'll try to put together a PR which adds these to the plugin, just wanted to start a conversation about the proposal first.

  2. emerssso commented on Apr 23, 2020

    @emerssso
    ContributorAuthor

    Feature is available on pub now.

  3. BoonJunTan commented on Jun 28, 2021

    @BoonJunTan

    Hey can I check if this is implemented and if there is a documentation for this as I couldn't find it anywhere online.

  4. github-actions commented on Jul 31, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  5. locked as resolved and limited conversation to collaborators on Jul 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: new featureNothing broken; request for a new capabilityp: google_sign_inThe Google Sign-In pluginpackageflutter/packages repository. See also p: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions