Ionic Framework 和 Firebase 3.x 版本:此域无权对您的 Firebase 项目进行 OAuth 操作

Ionic Framework and Firebase 3.x version: This domain is not authorized for OAuth operations for your Firebase project

我正在使用 Ionic Framework 和 Firebase 开发 iOS 应用程序。我已将项目中的 Firebase SDK 更新为 3.x 版本。我想要做的是在真实设备上使用 Facebook 对用户进行身份验证。当我在浏览器上测试时一切正常。但是,每当我 运行 在真正的 iOS 设备上时,我总是会收到以下错误:

此域无权对您的 Firebase 项目进行 OAuth 操作。从 Firebase 控制台编辑授权域列表。

在 Firebase 上,我已经将 "localhost" 和“127.0.0.1”添加到我的授权域列表中。所以我不确定现在该做什么。

请注意,我的项目中没有使用 WKWebView。

这里有人可以告诉我如何解决这个问题吗?请指教

我有同样的问题,但我通过创建新的 firebase 项目解决了它。

好的,这是我的临时解决方案:

我在我的离子项目中导入了 Firebase SDK v.2.x 和 Firebase SDK 3.x。我在 iOS 上使用版本 2.x 进行 Facebook 身份验证,然后我使用版本 3.x 访问 Firebase 上的所有新功能,例如存储等。

希望对您有所帮助。

错误 "This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console." 仅阻止 signInWithPopup() signInWithRedirect() linkWithPopup()linkWithRedirect() 操作工作。其他所有功能,包括 signInWithCredential(),都应该有效。

我相信您看到此错误是因为离子应用程序没有真正的域,而这是我上面提到的 4 个功能的要求。

您的问题的解决方案是忽略错误(它只是信息性的)并且不使用 signInWithPopup signInWithRedirect linkWithPopuplinkWithRedirect。相反,使用 OAuth 库,例如 ngCordovaOAuth and then use auth().signInWithCredential(...) (see example instructions for Twitter here).