-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add extra_params argument to signin call #369
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -252,15 +252,21 @@ - (void)signInWithPresentingViewController:(UIViewController *)presentingViewCon | |
- (void)signInWithPresentingViewController:(UIViewController *)presentingViewController | ||
hint:(nullable NSString *)hint | ||
additionalScopes:(nullable NSArray<NSString *> *)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) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add tests for this method? |
||
options = [options optionsWithExtraParameters:extraParams forContinuation:NO]; | ||
} | ||
|
||
[self signInWithOptions:options]; | ||
} | ||
|
||
- (void)signInWithPresentingViewController:(UIViewController *)presentingViewController | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,6 +162,7 @@ typedef NS_ERROR_ENUM(kGIDSignInErrorDomain, GIDSignInErrorCode) { | |
- (void)signInWithPresentingViewController:(UIViewController *)presentingViewController | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add documentation comment on the new parameter. |
||
hint:(nullable NSString *)hint | ||
additionalScopes:(nullable NSArray<NSString *> *)additionalScopes | ||
additionalParams:(nullable NSDictionary *)extraParams | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we keep the original method and create another method with the additionalParams parameter, to prevent breaking existing client integrations with this API? We can have the original method call this method with nil as additionalParams. |
||
completion: | ||
(nullable void (^)(GIDSignInResult *_Nullable signInResult, | ||
NSError *_Nullable error))completion | ||
|
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.
Could you please remove the extra space in the beginning of this line?