【发布时间】:2017-10-20 05:35:12
【问题描述】:
我正在创建一个通过 ionic 2 中的手机号码进行身份验证的系统,为此我使用了谷歌指南
首先,我相信一个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.RecaptchaVerifier
在我电脑的浏览器中一切正常,但在 mobil 上显示以下错误消息:
我需要替换那个firebase.auth.RecaptchaVerifier,但我不知道是否有任何插件或子表可以做,而且一切正常
非常感谢您的建议
【问题讨论】:
-
您没有提供错误。目前尚不清楚问题是什么。你能澄清一下吗?您是在移动离子应用程序还是移动浏览器中使用它?
-
对不起,这是我的第一篇文章,问题出现在 ionic 中,这是错误 cdn-enterprise.discourse.org/ionicframework/uploads/default/… 这是我的代码 cdn-enterprise.discourse.org/ionicframework/uploads/default/…
-
我从javebratt.com 发现了一篇很棒的帖子,请查看!
标签: cordova firebase ionic2 firebase-authentication phone-number