首页 > 解决方案 > 在 IOS 中,弹出窗口在尝试使用 firebase 身份验证时关闭(signInWithPopup 方法)

问题描述

我有一个反应应用程序,我在其中启用了 firebase 身份验证功能,它工作正常,然后我使用 wkwebview 从这个反应应用程序构建 ios 应用程序。一切正常,除了当我单击登录 google btn 时,弹出窗口打开,然后在 10 秒后关闭,响应代码为 auth/popup-closed-by-use。但它在 android 和 web 中运行良好。

我使用firebase身份验证功能有一个代码示例

        firebase.auth().signInWithPopup(provider).then(function (result) {
            console.log(result);
        }.catch(e=>{
            console.log(e)
        })

标签: iosreactjsfirebasefirebase-authenticationwkwebview

解决方案


推荐阅读