@@ -175,17 +175,18 @@ - (void)signInWithProviderUI:(id<FUIAuthProvider>)providerUI
175
175
}
176
176
177
177
// Block to complete sign-in
178
- void (^completeSignInBlock)(FIRAuthDataResult *) = ^(FIRAuthDataResult *authResult){
178
+ void (^completeSignInBlock)(FIRAuthDataResult *, NSError *) = ^(FIRAuthDataResult *authResult,
179
+ NSError *error) {
179
180
if (result) {
180
181
result (authResult.user , nil );
181
182
}
182
183
// Hide Auth Picker Controller which was presented modally.
183
184
if (isAuthPickerShown && presentingViewController.presentingViewController ) {
184
185
[presentingViewController dismissViewControllerAnimated: YES completion: ^{
185
- [self invokeResultCallbackWithAuthDataResult: authResult error: nil ];
186
+ [self invokeResultCallbackWithAuthDataResult: authResult error: error ];
186
187
}];
187
188
} else {
188
- [self invokeResultCallbackWithAuthDataResult: authResult error: nil ];
189
+ [self invokeResultCallbackWithAuthDataResult: authResult error: error ];
189
190
}
190
191
};
191
192
@@ -210,10 +211,9 @@ - (void)signInWithProviderUI:(id<FUIAuthProvider>)providerUI
210
211
code: FUIAuthErrorCodeMergeConflict
211
212
userInfo: userInfo];
212
213
result (nil , mergeError);
213
- [ self invokeResultCallbackWithAuthDataResult: nil error: mergeError] ;
214
+ completeSignInBlock (authResult, mergeError) ;
214
215
}
215
216
}
216
- completeSignInBlock (authResult);
217
217
}];
218
218
} else {
219
219
[self .auth signInAndRetrieveDataWithCredential: credential
@@ -234,7 +234,7 @@ - (void)signInWithProviderUI:(id<FUIAuthProvider>)providerUI
234
234
}
235
235
[self invokeResultCallbackWithAuthDataResult: nil error: error];
236
236
} else {
237
- completeSignInBlock (authResult);
237
+ completeSignInBlock (authResult, nil );
238
238
}
239
239
}];
240
240
}
0 commit comments