Ionic Framework和Firebase 3.x版本:此域名未授权用于Firebase项目的OAuth操作

cha*_*nat 11 ios firebase ionic-framework firebase-authentication

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

此域名未获得Firebase项目的OAuth操作授权.从Firebase控制台编辑授权域列表.

在Firebase上,我已经将"localhost"和"127.0.0.1"添加到我的授权域列表中.所以我不知道现在该做什么.

为了您的信息,我不在我的项目中使用WKWebView.

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

alf*_*ngj 11

该错误"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,然后使用auth().signInWithCredential(...)(请参阅此处的Twitter示例说明).

  • Firebase 仍然没有解决这个问题。我不想安装cordova插件只是为了让它工作。当尝试使用 JUST firebase 通过社交网络进行身份验证时,将 firebase 与任何混合风格的应用程序(cordova、ionic、phonegap 等)一起使用都会失败。 (2认同)