diff --git a/GoogleSignIn/Sources/GIDSignIn.m b/GoogleSignIn/Sources/GIDSignIn.m index 429c1666..0841fd72 100644 --- a/GoogleSignIn/Sources/GIDSignIn.m +++ b/GoogleSignIn/Sources/GIDSignIn.m @@ -248,15 +248,21 @@ - (void)signInWithPresentingViewController:(UIViewController *)presentingViewCon - (void)signInWithPresentingViewController:(UIViewController *)presentingViewController hint:(nullable NSString *)hint additionalScopes:(nullable NSArray *)additionalScopes + additionalParams:(nullable NSDictionary *)extraParams completion:(nullable GIDSignInCompletion)completion { - GIDSignInInternalOptions *options = + GIDSignInInternalOptions *options = [GIDSignInInternalOptions defaultOptionsWithConfiguration:_configuration presentingViewController:presentingViewController loginHint:hint addScopesFlow:NO scopes:additionalScopes completion:completion]; - [self signInWithOptions:options]; + + if (extraParams != nil) { + options = [options optionsWithExtraParameters:extraParams forContinuation:NO]; + } + + [self signInWithOptions:options]; } - (void)signInWithPresentingViewController:(UIViewController *)presentingViewController diff --git a/GoogleSignIn/Sources/Public/GoogleSignIn/GIDSignIn.h b/GoogleSignIn/Sources/Public/GoogleSignIn/GIDSignIn.h index 9ea59812..8fc20836 100644 --- a/GoogleSignIn/Sources/Public/GoogleSignIn/GIDSignIn.h +++ b/GoogleSignIn/Sources/Public/GoogleSignIn/GIDSignIn.h @@ -160,6 +160,7 @@ typedef NS_ERROR_ENUM(kGIDSignInErrorDomain, GIDSignInErrorCode) { - (void)signInWithPresentingViewController:(UIViewController *)presentingViewController hint:(nullable NSString *)hint additionalScopes:(nullable NSArray *)additionalScopes + additionalParams:(nullable NSDictionary *)extraParams completion: (nullable void (^)(GIDSignInResult *_Nullable signInResult, NSError *_Nullable error))completion