Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 4 additions & 22 deletions GoogleSignIn/Sources/GIDSignIn.m
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,6 @@ - (void)authenticateInteractivelyWithOptions:(GIDSignInInternalOptions *)options
additionalParameters[kSDKVersionLoggingParameter] = GIDVersion();
additionalParameters[kEnvironmentLoggingParameter] = GIDEnvironment();

#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
OIDAuthorizationRequest *request =
[[OIDAuthorizationRequest alloc] initWithConfiguration:_appAuthConfiguration
clientId:options.configuration.clientID
Expand All @@ -600,34 +599,17 @@ - (void)authenticateInteractivelyWithOptions:(GIDSignInInternalOptions *)options

_currentAuthorizationFlow = [OIDAuthorizationService
presentAuthorizationRequest:request
#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
presentingViewController:options.presentingViewController
callback:^(OIDAuthorizationResponse *_Nullable authorizationResponse,
NSError *_Nullable error) {
[self processAuthorizationResponse:authorizationResponse
error:error
emmSupport:emmSupport];
}];
#elif TARGET_OS_OSX
OIDAuthorizationRequest *request =
[[OIDAuthorizationRequest alloc] initWithConfiguration:_appAuthConfiguration
clientId:options.configuration.clientID
clientSecret:@""
scopes:options.scopes
redirectURL:redirectURL
responseType:OIDResponseTypeCode
additionalParameters:additionalParameters];

_currentAuthorizationFlow = [OIDAuthorizationService
presentAuthorizationRequest:request
presentingWindow:options.presentingWindow
callback:^(OIDAuthorizationResponse *_Nullable authorizationResponse,
NSError *_Nullable error) {
#endif // TARGET_OS_OSX
callback:^(OIDAuthorizationResponse *_Nullable authorizationResponse,
NSError *_Nullable error) {
[self processAuthorizationResponse:authorizationResponse
error:error
emmSupport:emmSupport];
}];
#endif // TARGET_OS_OSX

}

- (void)processAuthorizationResponse:(OIDAuthorizationResponse *)authorizationResponse
Expand Down