【问题标题】:Create users with email an phone provider using Admin Firebase使用 Admin Firebase 使用电子邮件和电话提供商创建用户
【发布时间】:2019-12-24 19:27:09
【问题描述】:

如何在 Firebase 中创建具有电话号码和电子邮件的用户作为提供商?

提供的代码仅将电话号码设置为唯一提供者。

admin.auth().createUser({

uid: email,
email: email,
emailVerified: true,
phoneNumber: checkMobileTel(mobileTel)

}) .then(function(userRecord: { uid: any; }) {

// See the UserRecord reference doc for the contents of userRecord.
console.log('Successfully created new user:', userRecord.uid);

}) .catch(function(error: any) {

console.log('Error creating new user:', error);

});

【问题讨论】:

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


    【解决方案1】:

    我认为您忘记添加密码字段。希望能帮上忙,祝编码愉快!

    password string 用户的原始未散列密码。长度必须至少为六个字符。

    【讨论】:

      猜你喜欢
      • 2021-08-04
      • 2019-12-24
      • 2019-01-21
      • 2018-03-25
      • 2023-01-29
      • 2018-03-12
      • 1970-01-01
      • 2016-11-27
      • 2015-01-09
      相关资源
      最近更新 更多