Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force to recaptcha verification flow for phone auth in Simulators #10426

Merged
merged 9 commits into from
Nov 4, 2022
Prev Previous commit
Next Next commit
Update FIRPhoneAuthProvider.m
  • Loading branch information
Bkie Fsc committed Oct 31, 2022
commit c1e646bc05c267e2effb7cf945a1d502d2c617f8
Original file line number Diff line number Diff line change
Expand Up @@ -595,9 +595,12 @@ - (void)verifyClientAndSendVerificationCodeToPhoneNumber:(NSString *)phoneNumber
*/
- (void)verifyClientWithUIDelegate:(nullable id<FIRAuthUIDelegate>)UIDelegate
completion:(FIRVerifyClientCallback)completion {
if ([GULAppEnvironmentUtil isSimulator]) {
[self reCAPTCHAFlowWithUIDelegate:UIDelegate completion:completion];
return;
// Remove the simulator check below after FCM supports APNs in simulators
renkelvin marked this conversation as resolved.
Show resolved Hide resolved
if (@available(iOS 16, *)) {
if ([GULAppEnvironmentUtil isSimulator]) {
renkelvin marked this conversation as resolved.
Show resolved Hide resolved
[self reCAPTCHAFlowWithUIDelegate:UIDelegate completion:completion];
return;
}
}
if (_auth.appCredentialManager.credential) {
completion(_auth.appCredentialManager.credential, nil, nil);
Expand Down