From c6ed777bb5989aa627975b4d89f4bd70ae6d3dcb Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Mon, 13 May 2024 08:58:16 -0500 Subject: [PATCH] chore(auth, ios): fix DLog formatting --- packages/auth/ios/RNFBAuth/RNFBAuthModule.m | 45 ++++++++++++--------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/packages/auth/ios/RNFBAuth/RNFBAuthModule.m b/packages/auth/ios/RNFBAuth/RNFBAuthModule.m index cdf6f9c0be..d408b6b097 100644 --- a/packages/auth/ios/RNFBAuth/RNFBAuthModule.m +++ b/packages/auth/ios/RNFBAuth/RNFBAuthModule.m @@ -578,7 +578,9 @@ - (void)invalidate { @"has expired or is not currently supported.", }]; } - DLog(@"using app SignInWithCredential: %@", firebaseApp.name)[[FIRAuth authWithApp:firebaseApp] + DLog(@"using app SignInWithCredential: %@", firebaseApp.name); + + [[FIRAuth authWithApp:firebaseApp] signInWithCredential:credential completion:^(FIRAuthDataResult *authResult, NSError *error) { if (error) { @@ -820,8 +822,9 @@ - (void)invalidate { : (NSString *)phoneNumber : (RCTPromiseResolveBlock)resolve : (RCTPromiseRejectBlock)reject) { - DLog(@"SignInWthPhoneNumber instance: %@", - firebaseApp.name)[[FIRPhoneAuthProvider providerWithAuth:[FIRAuth authWithApp:firebaseApp]] + DLog(@"SignInWthPhoneNumber instance: %@", firebaseApp.name); + + [[FIRPhoneAuthProvider providerWithAuth:[FIRAuth authWithApp:firebaseApp]] verifyPhoneNumber:phoneNumber UIDelegate:nil completion:^(NSString *_Nullable verificationID, NSError *_Nullable error) { @@ -862,8 +865,9 @@ - (void)invalidate { }]; return; } - DLog(@"using instance verifyPhoneNumberWithMultiFactorInfo: %@", - firebaseApp.name)[[FIRPhoneAuthProvider providerWithAuth:[FIRAuth authWithApp:firebaseApp]] + DLog(@"using instance verifyPhoneNumberWithMultiFactorInfo: %@", firebaseApp.name); + + [[FIRPhoneAuthProvider providerWithAuth:[FIRAuth authWithApp:firebaseApp]] verifyPhoneNumberWithMultiFactorInfo:hint UIDelegate:nil multiFactorSession:session @@ -907,12 +911,15 @@ - (void)invalidate { : (NSString *)verificationCode : (RCTPromiseResolveBlock)resolve : (RCTPromiseRejectBlock)reject) { - DLog(@"using instance resolve MultiFactorSignIn: %@", firebaseApp.name) - FIRPhoneAuthCredential *credential = - [[FIRPhoneAuthProvider providerWithAuth:[FIRAuth authWithApp:firebaseApp]] - credentialWithVerificationID:verificationId - verificationCode:verificationCode]; - DLog(@"credential: %@", credential) FIRMultiFactorAssertion *assertion = + DLog(@"using instance resolve MultiFactorSignIn: %@", firebaseApp.name); + + FIRPhoneAuthCredential *credential = + [[FIRPhoneAuthProvider providerWithAuth:[FIRAuth authWithApp:firebaseApp]] + credentialWithVerificationID:verificationId + verificationCode:verificationCode]; + DLog(@"credential: %@", credential); + + FIRMultiFactorAssertion *assertion = [FIRPhoneMultiFactorGenerator assertionWithCredential:credential]; [cachedResolver[sessionKey] resolveSignInWithAssertion:assertion @@ -955,11 +962,12 @@ - (void)invalidate { : (NSString *_Nullable)displayName : (RCTPromiseResolveBlock)resolve : (RCTPromiseRejectBlock)reject) { - DLog(@"using instance finalizeMultifactorEnrollment: %@", firebaseApp.name) - FIRPhoneAuthCredential *credential = - [[FIRPhoneAuthProvider providerWithAuth:[FIRAuth authWithApp:firebaseApp]] - credentialWithVerificationID:verificationId - verificationCode:verificationCode]; + DLog(@"using instance finalizeMultifactorEnrollment: %@", firebaseApp.name); + + FIRPhoneAuthCredential *credential = + [[FIRPhoneAuthProvider providerWithAuth:[FIRAuth authWithApp:firebaseApp]] + credentialWithVerificationID:verificationId + verificationCode:verificationCode]; FIRMultiFactorAssertion *assertion = [FIRPhoneMultiFactorGenerator assertionWithCredential:credential]; FIRUser *user = [FIRAuth authWithApp:firebaseApp].currentUser; @@ -980,8 +988,9 @@ - (void)invalidate { : (FIRApp *)firebaseApp : (NSString *)phoneNumber : (NSString *)requestKey) { - DLog(@"using instance verifyPhoneNumber: %@", - firebaseApp.name)[[FIRPhoneAuthProvider providerWithAuth:[FIRAuth authWithApp:firebaseApp]] + DLog(@"using instance verifyPhoneNumber: %@", firebaseApp.name); + + [[FIRPhoneAuthProvider providerWithAuth:[FIRAuth authWithApp:firebaseApp]] verifyPhoneNumber:phoneNumber UIDelegate:nil completion:^(NSString *_Nullable verificationID, NSError *_Nullable error) {