问题
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?
回答1:
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.
回答2:
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
来源:https://stackoverflow.com/questions/51814468/firebase-phone-authentication-pops-up-a-recaptcha-verification-window-on-ios-eve