Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ionic framework ionic 4 firebase验证电话验证码验证另一页_Ionic Framework_Firebase Authentication_Ionic4 - Fatal编程技术网

Ionic framework ionic 4 firebase验证电话验证码验证另一页

Ionic framework ionic 4 firebase验证电话验证码验证另一页,ionic-framework,firebase-authentication,ionic4,Ionic Framework,Firebase Authentication,Ionic4,我在手机上使用了firebase auth,它工作得很好,我在手机上收到了代码,但我现在遇到了一个问题 我需要验证码验证在另一个页面,而不是在同一个登录页面 我的代码: const appVerifier = this.recaptchaVerifier; return firebase.auth().signInWithPhoneNumber( this.final_phone, appVerifier).then(async (confirmationResu

我在手机上使用了firebase auth,它工作得很好,我在手机上收到了代码,但我现在遇到了一个问题

我需要验证码验证在另一个页面,而不是在同一个登录页面

我的代码:

        const appVerifier = this.recaptchaVerifier;
        return firebase.auth().signInWithPhoneNumber( this.final_phone, appVerifier).then(async (confirmationResult) => {
          console.log(confirmationResult.confirm)
          let alert =   await this.alertCtrl.create({
            header: 'من فضلك ضع كود التحقق',
            inputs: [{ name: 'confirmationCode', placeholder: 'كود التحقق' }],
            buttons: [
              {
                text: 'الغاء',
                role: 'cancel',
                cssClass: 'secondary',
                handler: (blah) => {
                  console.log('Confirm Cancel: blah');
                }
              }, {
                text: 'تاكيد',
                handler: data => {
                  confirmationResult.confirm(data.confirmationCode)
                    .then(function (result) {
                      console.log(result.user);

                    }).catch(function (error) {

                    });
                }
              }
            ]
          });
          alert.present();
        }).catch(

        );
现在它显示了将代码放入验证的警报,但我需要转到另一个页面,在通过
confirmationResult
时放入代码,然后它显示:

确认结果。确认不起作用


为什么不通过URL将数据传递到下一页?为了验证代码是否正确,我的意思是,您可以通过URL将代码传递到下一页。因为它是一个Ionic应用程序,URL将被隐藏