File tree Expand file tree Collapse file tree 4 files changed +28
-2
lines changed
packages/google_sign_in/google_sign_in Expand file tree Collapse file tree 4 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 1+ ## 5.0.2
2+
3+ * Fix flutter/flutter #48602 iOS flow shows account selection, if user is signed in to Google on the device.
4+
15## 5.0.1
26
37* Update platforms ` init ` function to prioritize ` clientId ` property when available;
Original file line number Diff line number Diff line change @@ -88,7 +88,11 @@ - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result
8888
8989 [GIDSignIn sharedInstance ].serverClientID = plist[kServerClientIdKey ];
9090 [GIDSignIn sharedInstance ].scopes = call.arguments [@" scopes" ];
91- [GIDSignIn sharedInstance ].hostedDomain = call.arguments [@" hostedDomain" ];
91+ if (call.arguments [@" hostedDomain" ] == [NSNull null ]) {
92+ [GIDSignIn sharedInstance ].hostedDomain = nil ;
93+ } else {
94+ [GIDSignIn sharedInstance ].hostedDomain = call.arguments [@" hostedDomain" ];
95+ }
9296 result (nil );
9397 } else {
9498 result ([FlutterError errorWithCode: @" missing-config"
Original file line number Diff line number Diff line change @@ -153,4 +153,22 @@ - (void)testRequestScopesReturnsTrueIfGranted {
153153 XCTAssertTrue ([result boolValue ]);
154154}
155155
156+ - (void )testHostedDomainIfMissed {
157+ FlutterMethodCall *methodCall =
158+ [FlutterMethodCall methodCallWithMethodName: @" init"
159+ arguments: @{
160+ @" signInOption" : @" SignInOption.standard" ,
161+ @" hostedDomain" : [NSNull null ],
162+ }];
163+
164+ XCTestExpectation *expectation =
165+ [self expectationWithDescription: @" expect hostedDomain equals nil" ];
166+ [self .plugin handleMethodCall: methodCall
167+ result: ^(id r) {
168+ [expectation fulfill ];
169+ }];
170+ [self waitForExpectations: @[ expectation ] timeout: 5 ];
171+ XCTAssertTrue ([self .mockSharedInstance.hostedDomain == nil ]);
172+ }
173+
156174@end
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: google_sign_in
22description : Flutter plugin for Google Sign-In, a secure authentication system
33 for signing in with a Google account on Android and iOS.
44homepage : https://github.com/flutter/plugins/tree/master/packages/google_sign_in/google_sign_in
5- version : 5.0.1
5+ version : 5.0.2
66
77flutter :
88 plugin :
You can’t perform that action at this time.
0 commit comments