Skip to content

Commit

Permalink
Merge pull request #1012 from kbot/master
Browse files Browse the repository at this point in the history
Update FUIAuth.m
  • Loading branch information
morganchen12 authored Jan 14, 2022
2 parents 59b8527 + 5f1cd5d commit 72a910a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion FirebaseAuthUI/Sources/FUIAuth.m
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ - (void)signInWithProviderUI:(id<FUIAuthProvider>)providerUI
[self.auth signInWithCredential:credential
completion:^(FIRAuthDataResult *_Nullable authResult,
NSError *_Nullable error) {
if (error && error.code == FIRAuthErrorCodeAccountExistsWithDifferentCredential) {
if (self.emailAuthProvider && error
&& error.code == FIRAuthErrorCodeAccountExistsWithDifferentCredential) {
NSString *email = error.userInfo[kErrorUserInfoEmailKey];
[self.emailAuthProvider handleAccountLinkingForEmail:email
newCredential:credential
Expand Down

0 comments on commit 72a910a

Please sign in to comment.