小编Bad*_*kat的帖子

Firebase函数返回,并且Promise不会退出该函数

我仍然是Firebase领域的初学者,我一直在尝试找出以下代码的问题所在,但是我以所有可能的方式失败了。

该代码应该uid从数据库中的用户概要文件中检索,然后使用它来更新身份验证概要文件,如果身份验证概要文件更新成功,则再次使用它来更新数据库概要文件。

在其中,index.js我定义了一个导出函数来处理HTML表单中的POST参数。下面的代码在另一个模块文件中定义处理程序函数:

 exports.auUpdateUserByEmail = (req, res) => {
  // This handler function will retrieve the POSTed params of user profile
  // and will attempt to update the existing user authentication as well as
  // the database profiles.
  //
  // This function accepts the following params:
  // 1. User email   // 2. Phone number   // 3. password   // 4. Display name
  // 5. Photo url   // 6. Disabled Flag
  //

  var db = admin.firestore();

  var uEmail …
Run Code Online (Sandbox Code Playgroud)

javascript node.js firebase firebase-realtime-database google-cloud-functions

5
推荐指数
1
解决办法
3126
查看次数