小编Isa*_*rez的帖子

Ionic2认证firebase

我正在通过离子2中的手机数量创建一个身份验证系统,为此我使用谷歌指南

首先,我相信一个firebase.auth.RecaptchaVerifier(是必要的参数之一)

this.autVer = new firebase.auth.RecaptchaVerifier('contCatcha', {
'size': 'invisible',
'callback': function (response) {
// reCAPTCHA solved, allow signInWithPhoneNumber.
}
});
Run Code Online (Sandbox Code Playgroud)

和laster使用auth.signInWithPhoneNumber angularfire

this.afAuth.auth.signInWithPhoneNumber("+57" + this.numeroCelular, this.autVer).then(verificationId => {
console.log("SMS Enviado");
this.confor = verificationId;
this.loading.dismiss();
this.estado = 1;
this.esperarCodigo();
})
Run Code Online (Sandbox Code Playgroud)

其中第二个参数是firebase.auth.RecaptchaVerifier创建的

在我的电脑的浏览器一切正常,但在mobil上显示以下错误信息:

我需要更换它firebase.auth.RecaptchaVerifier,但我不知道是否有任何插件或子仪表可以做,并且一切正常,我非常感谢你的建议

phone-number cordova firebase firebase-authentication ionic2

9
推荐指数
1
解决办法
8149
查看次数