I implemented Phone Authentication with Firebase on iOS. Authentication works. However, on iOS, a reCAPTCHA window pops up. I tried to enable Silent Notifications by enabling Background Modes and Push Notifications. It is skipping the reCAPTCHA test but it still pops up a blank page with a loading bar to do the verification automatically. Is there an extra step that I'm missing? Also, I'm new to XCode so I might be missing a configuration step (for example I didn't click any checkboxes on the Background Modes dropdown).
Do you have any suggestions on what I could be missing?
Don't forget to go in Firebase Project Settings > App check > and Register firebase project in SafetyNet and Play Integrity register with default time token 1 hour and u will remove reCaptcha from phone auth OTP!
You can use Firebase Authentication to sign in a user by sending an SMS message to the user's phone. The user signs in using a one-time code contained in the SMS message.
Implementing phone number authentication involves sending an SMS to a user's mobile. To do so, we need to pay for SMS services. But via Firebase, we can send an SMS without any cost.
I found the solution. Enabling "Background Modes" capability is not enough. Inside of the "Background Modes", you have to click "Remote Notifictions" checkbox.
I couldn't see that in the documentation.
To ensure that both scenarios are working correctly, test your app on a physical iOS device with background app refresh both enabled and disabled. When background app refresh is disabled, you should be able to successfully sign in after completing the reCAPTCHA challenge. You can also test the reCAPTCHA flow by running your app on an iOS simulator, which always uses the reCAPTCHA flow.
For Disable reCAPTCHA Authentication Go and Enabling Background Modes capability Inside of the Background Modes and check "Remote Notification" checkbox.
for more detail refer to the firebase document https://firebase.google.com/docs/auth/ios/phone-auth
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With