File tree 4 files changed +7
-19
lines changed
EmailAuth/FirebaseEmailAuthUI
PhoneAuth/FirebasePhoneAuthUI
4 files changed +7
-19
lines changed Original file line number Diff line number Diff line change @@ -237,15 +237,11 @@ - (void)autoUpgradeAccountWithProviderUI:(id<FUIAuthProvider>)providerUI
237
237
if (error) {
238
238
// Check for "credential in use" conflict error and handle appropriately.
239
239
if (error.code == FIRAuthErrorCodeCredentialAlreadyInUse) {
240
- FIRAuthCredential *newCredential = credential;
241
- // Check for and handle special case for Phone Auth Provider.
242
- if (providerUI.providerID == FIRPhoneAuthProviderID) {
243
- // Obtain temporary Phone Auth credential.
244
- newCredential = error.userInfo [FIRAuthErrorUserInfoUpdatedCredentialKey];
240
+ FIRAuthCredential *newCredential = error.userInfo [FIRAuthErrorUserInfoUpdatedCredentialKey];
241
+ NSDictionary *userInfo = @{ };
242
+ if (newCredential) {
243
+ userInfo = @{ FUIAuthCredentialKey : newCredential };
245
244
}
246
- NSDictionary *userInfo = @{
247
- FUIAuthCredentialKey : newCredential,
248
- };
249
245
NSError *mergeError = [FUIAuthErrorUtils mergeConflictErrorWithUserInfo: userInfo
250
246
underlyingError: error];
251
247
[self completeSignInWithResult: authResult
Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ - (void)signInWithDefaultValue:(nullable NSString *)defaultValue
221
221
}
222
222
223
223
- (void )signOut {
224
-
224
+ return ;
225
225
}
226
226
227
227
- (BOOL )handleOpenURL : (NSURL *)URL sourceApplication : (nullable NSString *)sourceApplication {
Original file line number Diff line number Diff line change @@ -284,16 +284,7 @@ - (void)signInWithDefaultValue:(nullable NSString *)defaultValue
284
284
}
285
285
286
286
- (void )signOut {
287
- FIRUser *user = _authUI.auth .currentUser ;
288
- __weak UIViewController *weakController = self.presentingViewController ;
289
- [user deleteWithCompletion: ^(NSError * _Nullable error) {
290
- if (error) {
291
- __strong UIViewController *presentingViewController = weakController;
292
- [FUIAuthBaseViewController showAlertWithMessage: error.localizedDescription
293
- presentingViewController: presentingViewController];
294
- return ;
295
- }
296
- }];
287
+ return ;
297
288
}
298
289
299
290
- (BOOL )handleOpenURL : (NSURL *)URL sourceApplication : (nullable NSString *)sourceApplication {
Original file line number Diff line number Diff line change @@ -165,6 +165,7 @@ - (void)signInWithDefaultValue:(nullable NSString *)defaultValue
165
165
}
166
166
167
167
- (void )signOut {
168
+ return ;
168
169
}
169
170
170
171
- (BOOL )handleOpenURL : (NSURL *)URL sourceApplication : (nullable NSString *)sourceApplication {
You can’t perform that action at this time.
0 commit comments