为什么Firebase电话身份验证需要在Xcode中注册自定义URL方案? [英] Why firebase phone auth requires a custom URL scheme to be registered in Xcode?

查看:53
本文介绍了为什么Firebase电话身份验证需要在Xcode中注册自定义URL方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我的理解正确,那么将注册自定义URL方案以使用其他URL启动应用程序.例如:如果注册了自定义方案foo,则可以使用foo://<params> url启动该应用程序.

If my understanding is right, custom URL schemes are registered to launch the app using a different url. For example: if custom scheme foo is registered, then the app can be launched using foo://<params> url.

如果是这种情况,为什么Firebase电话认证需要注册自定义URL方案?

If that is the case, why firebase phone auth requires registering a custom URL scheme?

推荐答案

iOS的Firebase Auth需要自定义方案,以防因任何原因无法使用APNs令牌的情况.这是必需的,因为出于安全目的,iOS中的电话身份验证依赖于推送通知.在这种情况下,它将回退到reCAPTCHA流.将启动SFSafariViewController中的网页,为reCAPTCHA提供服务,并成功解决后,将通过自定义URL方案重定向将其重定向回应用程序.

Firebase Auth for iOS requires a custom scheme in case an APNs token is not available for whatever reason. This is needed since phone auth in iOS relies on push notifications for security purposes. In that case, it will fallback to a reCAPTCHA flow. A webpage in a SFSafariViewController is launched serving a reCAPTCHA and on successful resolution, will redirect back to the app via a custom URL scheme redirect.

这篇关于为什么Firebase电话身份验证需要在Xcode中注册自定义URL方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆