Advertisement
Guest User

Untitled

a guest
Jul 5th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. this.onVerifyCodeSubmit = function(e) {
  2.         e.preventDefault();
  3.         if (!!self.getCodeFromUserInput()) {
  4.             window.verifyingCode = true;
  5.             self.updateVerifyCodeButtonUI();//Обновляет состояние кнопки «Проверить код» в зависимости от состояния форм.
  6.             var code = $("#loginform-password").val();
  7.             confirmationResult.confirm(code)
  8.             .then(function (result) {
  9.                 var user = result.user;
  10.                 window.verifyingCode = false;
  11.                 window.confirmationResult = null;
  12.                 self.updateVerificationCodeFormUI();
  13.             }).catch(function (error) {
  14.                 console.log('Error while checking the verification code. Error code: ' + error.code);
  15.                 if(error.code == 'auth/invalid-verification-code') {console.log(error.code);}
  16.                 else {console.log(error.code);}
  17.                 window.verifyingCode = false;
  18.             });
  19.         }
  20.     };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement