【问题标题】:Firebase authentecation not working on my freenom domainFirebase 身份验证在我的 freenom 域上不起作用
【发布时间】:2021-07-19 15:43:00
【问题描述】:

我正在使用带有 firebase SDK 的 Reactjs 进行身份验证,通过 google auth 它在开发服务器链接上工作正常,也可以在链接 http://localhost:3000/ 和 firebase 托管链接 https://pro--student.web.app/ 上工作,但是当我从我添加到firebase托管设置https://prostudent.ga的域身份验证不起作用所以我很确定代码很好问题只是域上的某个地方有人可以帮我解决这个问题吗? 这是你想要的验证码

auth.signInWithPopup(googleProvider)
    .then((result) => {
      // The signed-in user info.
      var user = result.user.providerData[0];
      store.dispatch({ type: actions.SIGNIN, payload: user });
    })
    .catch((error) => {
      alert(error.message);
    });

这是我的托管信息图片https://i.stack.imgur.com/0mqWF.png

【问题讨论】:

  • MXToolbox 报告该域的 DNS 配置无效。在托管域中,单击“查看”按钮以完成设置。
  • 是的,正如@samthecodingman 提到的,即使DNS Checker 也不会显示任何DNS 记录。 Firebase 要求您在设置域时添加一条 TXT 记录以进行验证以及几条 A 记录。确保您已正确设置它们。

标签: reactjs firebase firebase-authentication firebase-hosting


【解决方案1】:

在 Firebase Console 中,除了在 Firebase 托管部分的 Project Domains 中列出之外,请确保您的新自定义域包含在 Firebase 身份验证部分的 Authorized Domains 列表中。

【讨论】:

  • 非常感谢。正如您所说,问题出在授权区域,我没有将新添加的域添加为受信任域。再次非常感谢你
猜你喜欢
  • 2017-02-28
  • 1970-01-01
  • 2016-11-10
  • 1970-01-01
  • 1970-01-01
  • 2021-12-20
  • 1970-01-01
  • 2019-09-18
  • 2020-12-15
相关资源
最近更新 更多