Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[google_sign_in] Add implementations of requestScopes. #2599

Merged
merged 23 commits into from
Mar 27, 2020
Merged

[google_sign_in] Add implementations of requestScopes. #2599

merged 23 commits into from
Mar 27, 2020

Conversation

emerssso
Copy link
Contributor

Description

Adds implementation for requestScopes method introduced to the plugin interface in #2547.

Recreated since I messed up rebasing after first PR.

Related Issues

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

@ditman
Copy link
Member

ditman commented Mar 11, 2020

The web part of this, looks good to me! What's the use case here? Requesting a minimal set of scopes at first, and then if the user interacts further in the app request some more?

@emerssso
Copy link
Contributor Author

That's the primary one (basically approach scopes the same as other permissions). This way, we ask for permission to sensitive data in the context where it makes sense.

The other is to handle adding scopes as part of an app update. We see issues adding new scopes to the constructor when a user has signed in before an update that adds a scope (issues vary by platform). This way, we won't have to sign users out when we add scopes.

@ditman
Copy link
Member

ditman commented Mar 11, 2020

We see issues adding new scopes to the constructor when a user has signed in before an update that adds a scope

This sounds very interesting. I'm not sure if this is documented anywhere in the Google Sign In API or similar, but it'd probably be worth a medium blog post or similar! We can help you publish an article about this progressive approach to scopes, if you're interested in writing it!

@emerssso
Copy link
Contributor Author

if you're interested in writing it!

It does sound like something worth writing, I'll ping you about it offline.

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS and Android part looks good. Could we possibly add JUnit tests and XCTests?

@emerssso
Copy link
Contributor Author

emerssso commented Mar 12, 2020

iOS and Android part looks good. Could we possibly add JUnit tests and XCTests?

@cyanglaz, Happy to, I just couldn't find any existing ones for this plugin (and couldn't figure out how to add some easily). Do they live somewhere else and I just missed them?

@ditman
Copy link
Member

ditman commented Mar 12, 2020

PS @emerssso, a g3 issue just prompted this PR, it'll cause some (easy) conflicts in the pubspec + changelog of your _web changes. My apologies!

@emerssso
Copy link
Contributor Author

@ditman, No problem, thanks for the heads up!

@emerssso emerssso requested a review from cyanglaz March 12, 2020 22:42
Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GLTM on mobile

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants