【发布时间】:2021-12-26 14:21:44
【问题描述】:
我正在尝试使用 Angular 12 和 Firebase 实现 2FA。但是我在 ngAfterViewInit 的过程开始时不断收到错误:
这是我的代码:
ngAfterViewInit(): void {
this.windowRef = this.win.windowRef;
this.windowRef.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container', {
'size': 'invisible',
'callback': (response: any) => {
console.log('callback ==>',response);
}
});
this.windowRef.recaptchaVerifier.render();
}
我主要关注this example。
【问题讨论】:
标签: angular firebase firebase-authentication recaptcha