Skip to content
Merged
Changes from 1 commit
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
Next Next commit
fix calling callback on addScopes
  • Loading branch information
AntonKozlovskyi authored and Anton Kozlovskyi committed Jul 19, 2021
commit a78d06ea01d5717282ed524171992537ab11bc7c
7 changes: 4 additions & 3 deletions GoogleSignIn/Sources/GIDSignIn.m
Original file line number Diff line number Diff line change
Expand Up @@ -690,10 +690,11 @@ - (void)addCompletionCallback:(GIDAuthFlow *)authFlow {
[authFlow addCallback:^() {
GIDAuthFlow *handlerAuthFlow = weakAuthFlow;
if (self->_currentOptions.callback) {
dispatch_async(dispatch_get_main_queue(), ^{
self->_currentOptions.callback(self->_currentUser, handlerAuthFlow.error);
GIDSignInCallback callback = [self->_currentOptions.callback copy];
self->_currentOptions = nil;
});
dispatch_async(dispatch_get_main_queue(), ^{
callback(self->_currentUser, handlerAuthFlow.error);
});
}
}];
}
Expand Down