Skip to content

Commit 72a910a

Browse files
authored
Merge pull request #1012 from kbot/master
Update FUIAuth.m
2 parents 59b8527 + 5f1cd5d commit 72a910a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

FirebaseAuthUI/Sources/FUIAuth.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ - (void)signInWithProviderUI:(id<FUIAuthProvider>)providerUI
201201
[self.auth signInWithCredential:credential
202202
completion:^(FIRAuthDataResult *_Nullable authResult,
203203
NSError *_Nullable error) {
204-
if (error && error.code == FIRAuthErrorCodeAccountExistsWithDifferentCredential) {
204+
if (self.emailAuthProvider && error
205+
&& error.code == FIRAuthErrorCodeAccountExistsWithDifferentCredential) {
205206
NSString *email = error.userInfo[kErrorUserInfoEmailKey];
206207
[self.emailAuthProvider handleAccountLinkingForEmail:email
207208
newCredential:credential

0 commit comments

Comments
 (0)