ionic firebase phoneAuth在ios上不带recaptcha
我有一个ionic应用程序,我使用firebase电话验证,它使用recaptcha。它在android上运行良好,但在ios上抛出错误,称recaptcha只能在http环境中运行。我想知道是否有一种方法可以在不使用recaptcha的情况下执行firebase电话验证ionic firebase phoneAuth在ios上不带recaptcha,firebase,ionic4,recaptcha,Firebase,Ionic4,Recaptcha,我有一个ionic应用程序,我使用firebase电话验证,它使用recaptcha。它在android上运行良好,但在ios上抛出错误,称recaptcha只能在http环境中运行。我想知道是否有一种方法可以在不使用recaptcha的情况下执行firebase电话验证 this.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container',{ 'size': 'invisible
this.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container',{
'size': 'invisible'
});
let appVerifier = this.recaptchaVerifier;
this.appService.sendPhoneVerification(phoneNumber,appVerifier)
.then(confirmationResult => {
//do something
})
Ios抛出错误“RECAPTCHA只能在HTTP/HTTPS环境中运行”这就是我如何解决我的问题“RECAPTCHA只能在HTTP/HTTPS环境中运行”
if(this.plt.is('ios')){
//这里是ios代码
}否则{
//这里是安卓
}
公共登录用户(phoneNum){
这个.firebase.verifyPhoneNumber(phoneNum).then((vdata)=>{
this.refConfirm=vdata;
//您可以将此人重定向到验证页面或向其显示警报
输入验证码。
});
}
公共验证电话号码(phoneNumber){
让tokenPhone=firebase.auth.PhoneAuthProvider.credential(this.refConfirm,
电话号码);
firebase.auth().signInWithCredential(令牌电话)。然后((验证数据)=>{
//无论您想在这里做什么,或者将用户重定向到主页。
});
}