From c0419737c3cc201479b99d86e7fa737782ef61a9 Mon Sep 17 00:00:00 2001 From: Jan Knotek Date: Sat, 7 Mar 2020 19:48:44 +0000 Subject: [PATCH 1/3] Google_sign_in: Fix "pick account" on iOS Sign-in flow was always forcing user to fill email and password, the null check fixes the account picker, so the flow suggest Google Accounts already signed-in on iOS device. https://github.com/flutter/flutter/issues/48602 --- .../google_sign_in/ios/Classes/FLTGoogleSignInPlugin.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/google_sign_in/google_sign_in/ios/Classes/FLTGoogleSignInPlugin.m b/packages/google_sign_in/google_sign_in/ios/Classes/FLTGoogleSignInPlugin.m index dff3481ec16f..002cae08a5c0 100644 --- a/packages/google_sign_in/google_sign_in/ios/Classes/FLTGoogleSignInPlugin.m +++ b/packages/google_sign_in/google_sign_in/ios/Classes/FLTGoogleSignInPlugin.m @@ -76,7 +76,11 @@ - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result NSMutableDictionary *plist = [[NSMutableDictionary alloc] initWithContentsOfFile:path]; [GIDSignIn sharedInstance].clientID = plist[kClientIdKey]; [GIDSignIn sharedInstance].scopes = call.arguments[@"scopes"]; - [GIDSignIn sharedInstance].hostedDomain = call.arguments[@"hostedDomain"]; + if (call.arguments[@"hostedDomain"] == [NSNull null]) { + [GIDSignIn sharedInstance].hostedDomain = nil; + } else { + [GIDSignIn sharedInstance].hostedDomain = call.arguments[@"hostedDomain"]; + } result(nil); } else { result([FlutterError errorWithCode:@"missing-config" From 7bbe2c86c511075e7521c3638831bb122de881df Mon Sep 17 00:00:00 2001 From: Jan Knotek Date: Sat, 7 Mar 2020 21:29:12 +0000 Subject: [PATCH 2/3] Version bump --- packages/google_sign_in/google_sign_in/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google_sign_in/google_sign_in/pubspec.yaml b/packages/google_sign_in/google_sign_in/pubspec.yaml index 70363f049f15..99cdef99e3a5 100644 --- a/packages/google_sign_in/google_sign_in/pubspec.yaml +++ b/packages/google_sign_in/google_sign_in/pubspec.yaml @@ -2,7 +2,7 @@ name: google_sign_in description: Flutter plugin for Google Sign-In, a secure authentication system for signing in with a Google account on Android and iOS. homepage: https://github.com/flutter/plugins/tree/master/packages/google_sign_in/google_sign_in -version: 4.1.4 +version: 4.1.5 flutter: plugin: From 6b9a594d10ecfa3ee837abafa136a6ec13524943 Mon Sep 17 00:00:00 2001 From: Jan Knotek Date: Sat, 7 Mar 2020 21:31:13 +0000 Subject: [PATCH 3/3] Update CHANGELOG.md --- packages/google_sign_in/google_sign_in/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/google_sign_in/google_sign_in/CHANGELOG.md b/packages/google_sign_in/google_sign_in/CHANGELOG.md index c3dab069e738..180f09aec24b 100644 --- a/packages/google_sign_in/google_sign_in/CHANGELOG.md +++ b/packages/google_sign_in/google_sign_in/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.1.5 + +* Fix flutter/flutter#48602 iOS flow shows account selection, if user is signed in to Google on the device. + ## 4.1.4 * Make the pedantic dev_dependency explicit.