node.js - 使用 firebase auth 获取用户详细信息,其中条件是多个电话号码

标签 node.js firebase firebase-authentication firebase-admin

我想使用电话号码检索用户,其中电话号码是多个我会说电话号码数组我想使用它来获取用户响应。我只知道如何使用单个号码进行检索。

admin.auth().getUserByPhoneNumber('+91555555555')
  .then(function(userRecord) {
    // See the UserRecord reference doc for the contents of userRecord.
    console.log('Successfully fetched user data:', userRecord.toJSON());
  })
  .catch(function(error) {
    console.log('Error fetching user data:', error);
  });

我有一个电话号码数组

['+915555555555','+916666445555','+917778886655',+91555598668']

最佳答案

没有 API 可以通过电话号码批量检索用户。您必须迭代该数组并分别为每个数组调用 getUserByPhoneNumber

关于node.js - 使用 firebase auth 获取用户详细信息,其中条件是多个电话号码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59777084/

相关文章:

ios - 在 iOS 中离线保存和同步二进制数据的最佳技术?

firebase - 使用 Service Worker 中的 Fetch 处理 Firebase 数据库的身份验证

ios - 我可以为同一个应用使用两个 Firebase 帐户吗

android - 如何在使用 API 时处理 Flow Coroutines 异步行为

javascript - 使用casperjs下载资源图片文件

firebase - Crashlytics - Firebase 日志中的 Stacktrace 不可读

javascript - 如何以编程方式从网络选项卡中捕获查询字符串参数

javascript - Firebase 身份验证+功能 |使用 displayName 创建用户

node.js - 更新 Mongoose 模型对象的数组项

node.js - Mongoose find(),如何访问结果文档?