Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Phone Authentication pops up a reCAPTCHA verification window on iOS even if Background Modes and Push Notifications are enabled

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?

like image 643
batatop Avatar asked Aug 13 '18 02:08

batatop


People also ask

How do I disable reCaptcha verification for Firebase authentication?

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!

What is firebase phone verification?

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.

Is firebase SMS verification free?

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.


2 Answers

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.

like image 64
batatop Avatar answered Sep 22 '22 15:09

batatop


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

like image 33
Kavin Soni Avatar answered Sep 23 '22 15:09

Kavin Soni