After recaptcha verification, page only returned blank. It did nothing to do next step.
Screen Shot
After recaptcha verification, page only returned blank. It did nothing to do next step.
Screen Shot
In your app delegate's application(_:open:options:)
method, call Auth.auth().canHandle(url)
.
For the blank re-captcha page issue I was able to resolve it by doing these 3 things:
1st thing-
GoogleSerivce-Info.plist
file make sure the REVERSED_CLIENT_ID
is added to your project via the URL types using this. Follow the first part of the second step there: Add custom URL schemes to your Xcode project (look at the screenshot).2nd thing-
In the project navigator select the blue project icon
Select Capabilities
Open Background Modes
Select Background fetch
3rd thing-
PhoneAuthProvider.provider(auth: Auth.auth())
@IBAction func phoneButton(sender: UIButton) {
// ***step 5***
PhoneAuthProvider.provider(auth: Auth.auth())
PhoneAuthProvider.provider().verifyPhoneNumber(phoneNumberTextField.text!, uiDelegate: nil) {
(verificationID, error) in
if let error = error {
print(error.localizedDescription)
return
}
guard let verificationId = verificationID else { return }
// do something with verificationID
}
}
On iOS, the appVerificationDisabledForTesting setting has to be set to TRUE before calling verifyPhoneNumber. This is processed without requiring any APNs token or sending silent push notifications in the background, making it easier to test in a simulator. This also disables the reCAPTCHA fallback flow.
I face this issue and fix it by adding this code into my AppDelegate.m
- (BOOL) application: (UIApplication *) app
openURL: (NSURL *) url
options: (NSDictionary <UIApplicationOpenURLOptionsKey, id> *)
options {
if ([[FIRAuth auth] canHandleURL: url]) {
return YES;
} else {
// URL not auth related, developer should handle it.
return NO;
}
}
If Anyone came a across such issu, Try this.
// Before verifyPhoneNumber Method
Auth.auth().settings?.isAppVerificationDisabledForTesting = true
PhoneAuthProvider.provider().verifyPhoneNumber( ....
In case anyone reads this using SwiftUI. For me the problem was solved by attaching
.onOpenURL { url in
Auth.auth().canHandle(url)
}
to the first View of my app (right where you can find @main
).
© 2022 - 2025 — McMap. All rights reserved.