firebase - 为什么身份验证不能在自己的域上工作,但可以在 firebase 的域上工作?

标签 firebase subdomain firebase-authentication facebook-authentication firebase-hosting

如果您转到https://wfolly.firebaseapp.com/ ,您将能够通过点击“Iniciar session”来使用 Facebook 登录。然后,您会在注销文本“Cerrar session - 您的 FACEBOOK NAME”旁边看到您的名字。

但是,虽然 auth 在上面的 wfolly.firebase.com 上有效,但在 https://debatenomasafp.org/ 上不起作用,我自己的域通过 Firebase 托管连接到 Firebase 自己的 wfolly.fire(...) URL。

“不起作用”意味着您不会在注销文本“Cerrar sesión”旁边看到您的名字,并且通常无法像登录一样与网站交互。

出了什么问题?为什么他们的行为不一样?

我知道两个站点中的部署版本是相同的,因为当前部署反射(reflect)了两个 URL 的后期更改,而不仅仅是 Firebase 的更改。

身份验证在 localhost:8080 预部署上也可以正常工作。

我使用 Re-Base (github.com/tylermcginnis/re-base) 进行身份验证请求可能相关,也可能不相关。

最佳答案

加藤在上面的评论中通过 Slack 给了我答案。

我只需在 Firebase 控制台的“身份验证”下的“OAuth 重定向域”设置中授权新域即可。

关于firebase - 为什么身份验证不能在自己的域上工作,但可以在 firebase 的域上工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42119820/

相关文章:

带有 startAt() 的第二个参数的 Firebase orderByChild w/pagination 不排序

Android Studio - 无法解析同步 ML 套件示例

apache - .htaccess 将子域重写到目录

centos - 在centos 6中创建子域

javascript - 尝试运行我的应用程序时收到以下警告 : Possible Unhandled Promise Rejection (id:1)

android - 如何修复 `duplicate class com.google.firebase.components`?

javascript - Firebase.set() 添加额外的节点

seo - 我什么时候应该使用或避免使用子域?

android - 在 Firebase Auth 中,如何检测匿名用户已升级到例如Facebook的用户?

flutter - 通过使用flutter_login_facebook 0.2.1与Flubase进行Flutter Facebook登录