简体   繁体   English

Firebase 电话身份验证在 iOS 上弹出 reCAPTCHA 验证 window 即使后台模式和推送通知已启用

[英]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.我在 iOS 上使用 Firebase 实施了电话身份验证。身份验证有效。 However, on iOS, a reCAPTCHA window pops up.但是,在 iOS 上,弹出一个 reCAPTCHA window。 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.它正在跳过 reCAPTCHA 测试,但它仍然会弹出一个带有加载栏的空白页面来自动进行验证。 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).另外,我是 XCode 的新手,所以我可能缺少配置步骤(例如,我没有单击“背景模式”下拉列表中的任何复选框)。

Do you have any suggestions on what I could be missing?你对我可能遗漏的东西有什么建议吗?

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.为确保两种方案都能正常工作,请在启用和禁用后台应用刷新的物理 iOS 设备上测试您的应用。 When background app refresh is disabled, you should be able to successfully sign in after completing the reCAPTCHA challenge.禁用后台应用刷新后,您应该能够在完成 reCAPTCHA 挑战后成功登录。 You can also test the reCAPTCHA flow by running your app on an iOS simulator, which always uses the reCAPTCHA flow.您还可以通过在始终使用 reCAPTCHA 流程的 iOS 模拟器上运行您的应用程序来测试 reCAPTCHA 流程。

For Disable reCAPTCHA Authentication Go and Enabling Background Modes capability Inside of the Background Modes and check "Remote Notification" checkbox.要禁用 reCAPTCHA 身份验证,请转到并启用后台模式内的后台模式功能,然后选中“远程通知”复选框。

for more detail refer to the firebase document https://firebase.google.com/docs/auth/ios/phone-auth有关更多详细信息,请参阅 firebase 文档https://firebase.google.com/docs/auth/ios/phone-auth

This almost cause me to waste a lot of time.这几乎让我浪费了很多时间。 I had previously installed a build from Testflight that was not fully configured to skip the Recaptcha.我之前安装了一个来自 Testflight 的构建,它没有完全配置为跳过 Recaptcha。 (the push/background-refresh hadn't been enabled when the build was published) (发布构建时未启用推送/后台刷新)

So I set that and my certs all set up, pushed a new build to Testflight, updated on the phone in testflight, but still saw the recaptcha.所以我设置了它,我的证书都设置好了,将一个新版本推送到 Testflight,在 testflight 的手机上更新,但仍然看到了 recaptcha。

I had to uninstall the app from my phone, and reinstall through testflight again.我不得不从手机上卸载该应用程序,然后再次通过 testflight 重新安装 After that, logging in by phone no longer showed a recaptcha.之后,通过电话登录不再显示重新验证码。 :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 iOS电话,后台通知不震动? - iOS phone, notifications in background it's not vibrate? 如何在手机身份验证中显示 reCaptcha firebase react native - how to show reCaptcha in phone authentication firebase react native 电话号码身份验证不适用于 IOS 设备 [Firebase] - Authentication of phone number is not working on IOS Devices [Firebase] iOS 推送通知不适用于 Firebase - iOS Push Notifications doesn't work with Firebase 如何使用firebase实现flutter的电话号码验证? (不是认证) - How to implement phone number verification in flutter using firebase? (Not Authentication) Firebase 电话认证:如何启用“安卓设备验证” API - Firebase phone authentication: how to enable "Android Device Verification" API 如何通过 AWS Pinpoint 和 firebase 发送 iOS 推送通知? - How to send iOS push notifications through AWS Pinpoint and firebase? Flutter Firebase 消息(推送通知)不适用于 iOS 在现有应用程序中 - Flutter Firebase Messaging (Push Notifications) Not Working for iOS in an Already Existing Application 为什么 HTTP 图片 URL 不适用于 Firebase iOS 推送通知? - Why are HTTP image URLs not working with Firebase iOS push notifications? Firebase 推送通知 iOS:未注册。 为什么? - Firebase push notifications iOS: getting NotRegistered. Why?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM