我离子2,创建认证系统,通过手机号码,我使用谷歌的引导 Ionic2认证火力
首先,我相信firebase.auth.RecaptchaVerifier
(是必要的参数之一)
this.autVer = new firebase.auth.RecaptchaVerifier('contCatcha', {
'size': 'invisible',
'callback': function (response) {
// reCAPTCHA solved, allow signInWithPhoneNumber.
}
});
和拉斯特使用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();
})
当第二个参数是firebase.auth.Reca ptchaVerifier创建
在我的电脑一切正常的浏览器,但在美孚显示以下错误信息:
我需要更换firebase.auth.RecaptchaVerifier
,但我不知道是否有任何插件或亚米做,ahcer一切正常 我真的很感谢你的建议
您没有提供错误。目前尚不清楚问题是什么。你能澄清吗?您是在移动离子应用程序还是移动浏览器中使用它? – bojeil
对不起,这是我的第一篇文章,问题以离子形式出现,这是错误 https://cdn-enterprise.discourse.org/ionicframework/uploads/default/original/3X/a/8/a8d5ca92c55ad9c0fcad055ebaa59fe0dd480f97.png 这是我的代码 https://cdn-enterprise.discourse.org/ionicframework/uploads/default/original/3X/b/e/be41db72eaa9180bd051928b08ccc530212f3c7f.png –
我发现从一个真棒信息[javebratt.com](HTTPS ://javebratt.com/firebase-phone-authentication/),请查看! – ray