-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[google_sign_in] Support Dart-based configuration and serverClientId
#5250
[google_sign_in] Support Dart-based configuration and serverClientId
#5250
Conversation
|
Wow, thanks a lot for this PR, I really need this in my app. Hopefully it will be merged soon. |
|
This'd also fix flutter/flutter#57945 (added to the description) |
Why does this require a breaking change, rather than following our usual documented process of adding a new method with the new parameter? |
You're right, this does not require a breaking change. What I meant is that this requires changes in the platform interface and I decided to make it a breaking change since all platform implementations are updated together with it. But I'm happy to refactor it to a non-breaking change. |
See https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#breaking-changes-to-plugin-platform-interfaces and https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#changing-platform-interface-method-parameters |
|
I have added a list of todo items for implementing this to the description. |
655f993 to
b9134b1
Compare
|
/cc'ing @cyanglaz here too, he was interested in getting this feature implemented not too long ago! |
...ign_in_android/android/src/main/java/io/flutter/plugins/googlesignin/GoogleSignInPlugin.java
Outdated
Show resolved
Hide resolved
.../google_sign_in/google_sign_in_platform_interface/lib/src/method_channel_google_sign_in.dart
Outdated
Show resolved
Hide resolved
.../google_sign_in/google_sign_in_platform_interface/lib/google_sign_in_platform_interface.dart
Outdated
Show resolved
Hide resolved
ffd22e8 to
178cfbb
Compare
serverClientId
...ign_in_android/android/src/main/java/io/flutter/plugins/googlesignin/GoogleSignInPlugin.java
Outdated
Show resolved
Hide resolved
packages/google_sign_in/google_sign_in_ios/ios/Classes/FLTGoogleSignInPlugin.m
Outdated
Show resolved
Hide resolved
packages/google_sign_in/google_sign_in_ios/ios/Classes/FLTGoogleSignInPlugin.m
Outdated
Show resolved
Hide resolved
|
@cyanglaz looks like the changes were made, friendly ping |
packages/google_sign_in/google_sign_in_ios/ios/Classes/FLTGoogleSignInPlugin.m
Outdated
Show resolved
Hide resolved
packages/google_sign_in/google_sign_in_platform_interface/lib/src/types.dart
Show resolved
Hide resolved
packages/google_sign_in/google_sign_in_platform_interface/lib/src/types.dart
Show resolved
Hide resolved
cyanglaz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM on iOS. Still need to remove the path dependency before merging.
|
@stuartmorgan Do I need someone else to review and approve this PR before landing the platform interface PR? |
stuartmorgan-g
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments below; mostly this looks good, but the Java test coverage issue needs to be resolved before we can start landing parts of the PR.
packages/google_sign_in/google_sign_in/test/google_sign_in_test.dart
Outdated
Show resolved
Hide resolved
packages/google_sign_in/google_sign_in_ios/example/ios/RunnerTests/GoogleSignInTests.m
Outdated
Show resolved
Hide resolved
packages/google_sign_in/google_sign_in_platform_interface/CHANGELOG.md
Outdated
Show resolved
Hide resolved
...ign_in_android/android/src/main/java/io/flutter/plugins/googlesignin/GoogleSignInPlugin.java
Show resolved
Hide resolved
|
This pull request is not mergeable in its current state, likely because of a merge conflict. Pre-submit CI jobs were not triggered. Pushing a new commit to this branch that resolves the issue will result in pre-submit jobs being scheduled. |
|
We are waiting on this to get merged is there any blocker left? |
|
@blaugold this looks ready to merge once the package is no longer referenced locally and the publishable/federated_safety tests pass. |
bddf436 to
5166457
Compare
|
Waiting for #6034 to land |
5166457 to
bf421e1
Compare
|
Platform implementations have landed and have been removed from this PR, so it should be good to go. |
|
Re-running tests now; it looks like the PR update was just posted before the previous PRs plugins had actually been published. |
|
Thanks again for the contribution @blaugold ! |
|
Thanks to all the reviewers helping me land this! |
|
@stuartmorgan Just letting you know that the linked issues did not get closed by merging this. |
|
@jmagman flutter/flutter#96391 should have been closed as well when this PR was merged, but is still open. |
|
Thanks for the contribution @blaugold!! About the auto-close, I created this: flutter/flutter#106211, but I'm not sure if this is a flutter repo issue, or a github issue (or a mix of both!) |
This PR removes the requirement to add a
GoogleService-Info.plistfile for iOS apps and instead allows for configuration though Dart.To this end, a new parameter (
serverClientId) is added to theGoogleSignInconstructor.This necessitates a breaking change ingoogle_sign_in_platform_interface.While working on this PR, I noticed that on Android
clientIdwas interpreted as a server client ID as opposed to an app client ID, like on iOS and Web. On Android, app client IDs are not required/supported. To provide an API that is consistent across platforms, passing a non-null value forclientIdnowthrowslogs a warning on Android andserverClientIdis used asclientIdwas previously.Closes flutter/flutter#96391
Fixes flutter/flutter#57945
Todo
serverClientIdparameter to platform interfaceinitmethod (spin-out from this PR)[google_sign_in_platform_interface] Add support for
serverClientId#5256[google_sign_in] Implement Dart-based configuration and
serverClientId#6034Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.