Skip to content

Commit 90ccc59

Browse files
authored
Fall back to reCAPTCHA verification in phone auth if push notification is not received (#8653)
* Fall back to reCAPTCHA verification if the APNs notification for verifying the application is not received before the timeout. * Add unit test. * Update changelog. * Refactor tests.
1 parent 4046281 commit 90ccc59

File tree

3 files changed

+257
-437
lines changed

3 files changed

+257
-437
lines changed

FirebaseAuth/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Unreleased
2+
- [fixed] Fall back to reCAPTCHA for phone auth app verification if the push notification is not received before the timeout. (#8653)
3+
14
# 8.6.0
25
- [fixed] Annotated platform-level availability using `API_UNAVAILABLE` instead of conditionally compiling certain methods with `#if` directives (#8451).
36

FirebaseAuth/Sources/AuthProvider/Phone/FIRPhoneAuthProvider.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,12 @@ - (void)verifyClientWithUIDelegate:(nullable id<FIRAuthUIDelegate>)UIDelegate
629629
FIRLogWarning(kFIRLoggerAuth, @"I-AUT000014",
630630
@"Failed to receive remote notification "
631631
@"to verify app identity within "
632-
@"%.0f second(s)",
632+
@"%.0f second(s), falling back to "
633+
@"reCAPTCHA verification.",
633634
timeout);
635+
[self reCAPTCHAFlowWithUIDelegate:UIDelegate
636+
completion:completion];
637+
return;
634638
}
635639
completion(credential, nil, nil);
636640
}];

0 commit comments

Comments
 (0)