【问题标题】:How to get uid immediate after creating a user in firebase如何在firebase中创建用户后立即获取uid
【发布时间】:2018-01-03 20:18:11
【问题描述】:

我正在通过

创建一个firebase用户
  fnCreateUserWithEmailAndPassword(email, password) : Observable<any> {
    return Observable.fromPromise(
      this.afAuth.auth.createUserWithEmailAndPassword(email, password)
    );
  }

如何获取该用户的 uid?

【问题讨论】:

    标签: typescript firebase firebase-authentication


    【解决方案1】:

    根据API docs for createUserWithEmailAndPassword(),该函数返回的承诺包含User 对象。用户的 uid 将在该对象的 uid 字段中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-01-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-04
      相关资源
      最近更新 更多