我離子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