Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,6 @@ public void addAuthStateListener(final String appName) {
} else {
eventBody.putString("appName", appName); // for js side distribution
}
Log.d(TAG, "addAuthStateListener:eventBody " + eventBody.toString());

ReactNativeFirebaseEvent event =
new ReactNativeFirebaseEvent("auth_state_changed", eventBody, appName);
emitter.sendEvent(event);
Expand Down Expand Up @@ -1518,7 +1516,7 @@ public void verifyPhoneNumber(
final String requestKey,
final double timeout,
final boolean forceResend) {
Log.d(TAG, "verifyPhoneNumber:" + phoneNumber);
Log.d(TAG, "verifyPhoneNumber");

FirebaseApp firebaseApp = FirebaseApp.getInstance(appName);
final FirebaseAuth firebaseAuth = FirebaseAuth.getInstance(firebaseApp);
Expand Down
17 changes: 1 addition & 16 deletions packages/auth/ios/RNFBAuth/RNFBAuthHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -1097,8 +1097,7 @@ + (void)verifyPhoneNumberWithMultiFactorInfo:(NSString *)appName
if (error) {
[self promiseRejectAuthException:reject error:error];
} else {
DLog(@"verificationID: %@", verificationID)
resolve(verificationID);
resolve(verificationID);
}
}];
}
Expand All @@ -1112,8 +1111,6 @@ + (void)verifyPhoneNumberForMultiFactor:(NSString *)appName
FIRApp *firebaseApp = [RCTConvert firAppFromString:appName];

DLog(@"verifyPhoneNumberForMultifactor using app: %@", firebaseApp.name);
DLog(@"verifyPhoneNumberForMultifactor phoneNumber: %@", phoneNumber);
DLog(@"verifyPhoneNumberForMultifactor sessionKey: %@", sessionKey);
FIRMultiFactorSession *session = [cachedSessions get:sessionKey];
if (session == nil) {
[RNFBSharedUtils rejectPromiseWithUserInfo:reject
Expand Down Expand Up @@ -1152,8 +1149,6 @@ + (void)resolveMultiFactorSignIn:(NSString *)appName
[[FIRPhoneAuthProvider providerWithAuth:[FIRAuth authWithApp:firebaseApp]]
credentialWithVerificationID:verificationId
verificationCode:verificationCode];
DLog(@"credential: %@", credential);

FIRMultiFactorAssertion *assertion =
[FIRPhoneMultiFactorGenerator assertionWithCredential:credential];

Expand Down Expand Up @@ -1211,8 +1206,6 @@ + (void)generateTotpSecret:(NSString *)appName
DLog(@"using instance resolve generateTotpSecret: %@", firebaseApp.name);

FIRMultiFactorSession *session = [cachedSessions get:sessionKey];
DLog(@"using sessionKey: %@", sessionKey);
DLog(@"using session: %@", session);
[FIRTOTPMultiFactorGenerator
generateSecretWithMultiFactorSession:session
completion:^(FIRTOTPSecret *_Nullable totpSecret,
Expand All @@ -1222,9 +1215,7 @@ + (void)generateTotpSecret:(NSString *)appName
}
else {
NSString *secretKey = totpSecret.sharedSecretKey;
DLog(@"secretKey generated: %@", secretKey);
[cachedTotpSecrets putReplacing:secretKey value:totpSecret];
DLog(@"cachedSecret: %@", [cachedTotpSecrets get:secretKey]);
resolve(@{
@"secretKey" : secretKey,
});
Expand All @@ -1240,14 +1231,12 @@ + (NSString *)generateQrCodeUrl:(NSString *)appName
FIRApp *firebaseApp = [RCTConvert firAppFromString:appName];

DLog(@"generateQrCodeUrl using instance resolve generateQrCodeUrl: %@", firebaseApp.name);
DLog(@"generateQrCodeUrl using secretKey: %@", secretKey);
FIRTOTPSecret *totpSecret = [cachedTotpSecrets get:secretKey];
if (!totpSecret) {
RNFBAuthThrowSyncErrorWithCode(@"invalid-multi-factor-secret",
@"can't find secret for provided key");
}
NSString *url = [totpSecret generateQRCodeURLWithAccountName:account issuer:issuer];
DLog(@"generateQrCodeUrl got QR Code URL %@", url);
return url;
}

Expand All @@ -1256,9 +1245,7 @@ + (void)openInOtpApp:(NSString *)appName
qrCodeUri:(NSString *)qrCodeUri {
[self initializeSharedStateOnce];

DLog(@"generateQrCodeUrl using secretKey: %@", secretKey);
FIRTOTPSecret *totpSecret = [cachedTotpSecrets get:secretKey];
DLog(@"openInOtpApp using qrCodeUri: %@", qrCodeUri);
[totpSecret openInOTPAppWithQRCodeURL:qrCodeUri];
}

Expand Down Expand Up @@ -1345,8 +1332,6 @@ + (void)finalizeTotpEnrollment:(NSString *)appName
DLog(@"using instance finalizeTotpEnrollment: %@", firebaseApp.name);

FIRTOTPSecret *cachedTotpSecret = [cachedTotpSecrets get:totpSecret];
DLog(@"using totpSecretKey: %@", totpSecret);
DLog(@"using cachedSecret: %@", cachedTotpSecret);
FIRTOTPMultiFactorAssertion *assertion =
[FIRTOTPMultiFactorGenerator assertionForEnrollmentWithSecret:cachedTotpSecret
oneTimePassword:verificationCode];
Expand Down
Loading