https://github.com/angular/angularfire/
这个库的文档并不是那么理想,在我的网络应用程序中,我试图查明登录的用户是否启用了任何多因素身份验证。我不是在登录过程中谈论,而是在一般情况下谈论。在普通的 firebase 上,用户有一个名为“multiFactor”的属性,该属性在该库的用户中不存在。现在的问题是,我如何访问用户的 multiFactor 状态?希望我提供了足够的信息。
谢谢大家。
我尝试的只是检查我通过身份验证获得的用户对象并检查身份验证和用户的所有属性
import * as firebase from '@angular/fire/auth';
constructor(private authentication: firebase.Auth) {
}
public async register() {
const currentUser = this.authentication.currentUser;
if (currentUser) {
const multiFactorUser = firebase.multiFactor(currentUser);
const multieFactorSession = await multiFactorUser.getSession();
}
}