0

将Firebase从2.x更新为3.x后,firebase.auth()。signInWithRedirect '脸谱')不再有效。 Facebook验证用于精细工作:你花了Facebook的授权登录,然后回到火力地堡的web应用程序现在登录将Firebase从2.x更新为3.x后,firebase.auth()。signInWithRedirect('facebook')不再有效

这就是现在发生的事情:

  • 网址重定向到的东西像

https://project-PROJECTID/__/auth/handler?apiKey=APIKEY&appName=%5BDEFAULT%5D&authType=signInViaRedirect&providerId=facebook.com&redirectUrl=http%3A%2F%2Flocalhost%3A8080%2F&v=3.6.9

  • Chrome的浏览器主窗口显示

这个网站无法达到

项目专案编号的DNS服务器地址无法找到。

  • 和控制台读取

https://project-PROJECTID//auth/handler?apiKey=APIKEY_ ... iderId = facebook.com &的redirectUrl = HTTP%3A%2F%2Flocalhost%3A8080%2F & V = 3.6.9:1 GET https://project-PROJECTID//auth/handler?apiKey=APIKEY ... oviderId = facebook.com &的redirectUrl =的http%3A%2F%2Flocalhost%3A8080%2F & v = 3.6.9 网:: ERR_NAME_NOT_RESOLVED

它卡在那里,不会自动返回到Firebase网络应用程序。手动返回显示你仍然退出。

任何想法可能会发生什么?

回答

0

呼叫签名已改为:

var facebook = new firebase.auth.FacebookAuthProvider(); 
facebook.addScope('user_birthday'); // optional 
firebase.auth().signInWithRedirect(facebook); 

详情请参阅this guide

编辑:此外,它看起来像你可能会初始化错误的SDK。你能告诉我什么firebase.initializeApp在您的应用程序中看起来像?

+0

延误的道歉。我实际上直接使用Rebase而不是Firebase,因此我使用的命令是[this](https://github.com/tylermcginnis/re-base#authwithoauthredirectprovider-handler-settings)。我本来应该在这个问题上说明这一点,但在重新编制基础方面没有答复。道歉。相应地,这是初始化代码。使用1.x版本,它工作并同时更新rebase为2.x和Firebase为3.x(代码更改显示在[此处](https://github.com/tylermcginnis/re-base#upgrading-to-re -base-2x-from-1x))导致了这个问题。 – Norbert