Firebase телефон аутентичный Ionic создатель

это ошибка, которую я получаю при запуске кода

это мой код для проверки подлинности телефона с использованием firebase, это всего лишь несколько недель, я пытаюсь справиться с ionic, может кто-нибудь, пожалуйста, разобраться, где происходит неправильно

  function ($scope, $stateParams , $firebaseAuth , $state , $rootScope , $firebaseArray ,$window ,$ionicLoading)
     var fba=firebase.auth();
            $scope.phne = {
                phoneNumber: ''
            };
                fba.languageCode = 'in';

    var appVerifier = this.recaptchaVerifier;
    this.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('Verify', {
      'size': 'invisible',
      'callback': function(response) {
        // reCAPTCHA solved, allow signInWithPhoneNumber.
        phone();
      }
    });
     $scope.phone = function(){
         var phoneNumber = this.phne.phoneNumber;
         fba.signInWithPhoneNumber(phoneNumber, appVerifier)
        .then(auth => {

             $ionicLoading.show({
                template: '<ion-spinner icon="spiral"></ion-spinner>'
            });
          // SMS sent. Prompt user to type the code from the message, then sign the
          // user in with confirmationResult.confirm(code).
          this.confirmationResult = confirmationResult;
        }).catch(function (error) {
          // Error; SMS not sent
            $ionicLoading.hide();
            $ionicLoading.show({
                template: 'verification code not sent:....please try again'
            });
          // ...
          console.log(error);
        });

    };

0 ответов

Другие вопросы по тегам