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