Skip to content

Commit 9140cb0

Browse files
committed
Adds correct error handling for linking errors
1 parent fcd4854 commit 9140cb0

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

FirebaseAuthUI/FUIAuth.m

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,15 @@ - (void)signInWithProviderUI:(id<FUIAuthProvider>)providerUI
212212
mergeError = [NSError errorWithDomain:FUIAuthErrorDomain
213213
code:FUIAuthErrorCodeMergeConflict
214214
userInfo:userInfo];
215-
result(nil, mergeError);
216-
completeSignInBlock(authResult, mergeError);
215+
result(nil, error);
216+
completeSignInBlock(authResult, error);
217+
} else {
218+
if (!isAuthPickerShown || error.code != FUIAuthErrorCodeUserCancelledSignIn) {
219+
[self invokeResultCallbackWithAuthDataResult:nil error:error];
220+
}
221+
if (result) {
222+
result(nil, error);
223+
}
217224
}
218225
}
219226
}];
@@ -229,7 +236,6 @@ - (void)signInWithProviderUI:(id<FUIAuthProvider>)providerUI
229236
singInResult:result];
230237
return;
231238
}
232-
233239
if (error) {
234240
if (result) {
235241
result(nil, error);

0 commit comments

Comments
 (0)