How to change a prompt to an input text and wait the user until send the code in firebase verifyPhoneNumber method?Firebase WEB - Email Verification not being sent. What's wrong with the codeAndroid Firebase: does SMS code have to be sent everytime user signs in?Firebase email verification WITHOUT creating and accountfirebase auth Invalide codepin sended known that i set the right codeFirebase: How to do a phone number authentication after the user has been registered?RN / Firebase: Link a phone credential with an existing accountFirebase PhoneAuthentication not returning verification CodeHow to send a verification code to an email idhow to handle when user selects wrong images for the invisible recaptcha challenge that comes with firebase?Firebase Phone Auth Verification is very slow

Wiring IKEA light fixture into old fixture

How to work a regular job as a former celebrity

Can we have too many dialogue tags and follow up actions?

How can I deal with someone that wants to kill something that isn't supposed to be killed?

Chemistry Riddle

What is a "staved" town, like in "Staverton"?

If hash functions append the length, why does length extension attack work?

Can a creature sustain itself by eating its own severed body parts?

How can I calculate the cost of Skyss bus tickets

High income and difficulty during interviews

Is it ethical to tell my teaching assistant that I like him?

Import data from a current web session?

Do you have to hide in order for other creatures to not know your location inside a fog cloud?

Are rockets faster than airplanes?

Is an easily guessed plot twist a good plot twist?

Inverse Colombian Function

Higher calorie ice cream

What kind of anatomy does a centaur have?

Ultraproduct of Dividing Lines

Can't understand how static works exactly

How could Barty Crouch Jr. have run out of Polyjuice Potion at the end of the Goblet of Fire movie?

Character Arcs - What if the character doesn't overcome the big lie, flaws or wounds?

Found more old paper shares from broken up companies

how to add 1 milliseconds on a datetime string?



How to change a prompt to an input text and wait the user until send the code in firebase verifyPhoneNumber method?


Firebase WEB - Email Verification not being sent. What's wrong with the codeAndroid Firebase: does SMS code have to be sent everytime user signs in?Firebase email verification WITHOUT creating and accountfirebase auth Invalide codepin sended known that i set the right codeFirebase: How to do a phone number authentication after the user has been registered?RN / Firebase: Link a phone credential with an existing accountFirebase PhoneAuthentication not returning verification CodeHow to send a verification code to an email idhow to handle when user selects wrong images for the invisible recaptcha challenge that comes with firebase?Firebase Phone Auth Verification is very slow






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I am working on an angular project where user can Verify order by enter his phone number and get a Verification Code in his phone and then send it back with Firebase verifyPhoneNumber Method.
I want to change the code from getting the Verification Code of a prompt to an input shown after the user enter his number and click send the code button.



ngOnInit()
...
firebase.auth().useDeviceLanguage();
this.windowRef = this.win.windowRef;
this.windowRef.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container');
this.windowRef.recaptchaVerifier.render();
this.provider = new firebase.auth.PhoneAuthProvider();


sendLoginCode()
const appVerifier = this.windowRef.recaptchaVerifier;
const num = this.phoneNumber.e164;
console.log(num);

this.provider.verifyPhoneNumber(num, appVerifier)
.then(verificationId =>
var verificationCode = window.prompt('Please enter the verification code that was sent to your mobile device.');
return firebase.auth.PhoneAuthProvider.credential(verificationId,
verificationCode);
)
.then(phoneCredential =>
console.log(phoneCredential);
return firebase.auth().currentUser.updatePhoneNumber(phoneCredential);
)
.catch(err => console.log(err) );



I think this function need to be splited and It need to add a function to verify the verification code and execute the rest of the function.










share|improve this question






























    1















    I am working on an angular project where user can Verify order by enter his phone number and get a Verification Code in his phone and then send it back with Firebase verifyPhoneNumber Method.
    I want to change the code from getting the Verification Code of a prompt to an input shown after the user enter his number and click send the code button.



    ngOnInit()
    ...
    firebase.auth().useDeviceLanguage();
    this.windowRef = this.win.windowRef;
    this.windowRef.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container');
    this.windowRef.recaptchaVerifier.render();
    this.provider = new firebase.auth.PhoneAuthProvider();


    sendLoginCode()
    const appVerifier = this.windowRef.recaptchaVerifier;
    const num = this.phoneNumber.e164;
    console.log(num);

    this.provider.verifyPhoneNumber(num, appVerifier)
    .then(verificationId =>
    var verificationCode = window.prompt('Please enter the verification code that was sent to your mobile device.');
    return firebase.auth.PhoneAuthProvider.credential(verificationId,
    verificationCode);
    )
    .then(phoneCredential =>
    console.log(phoneCredential);
    return firebase.auth().currentUser.updatePhoneNumber(phoneCredential);
    )
    .catch(err => console.log(err) );



    I think this function need to be splited and It need to add a function to verify the verification code and execute the rest of the function.










    share|improve this question


























      1












      1








      1








      I am working on an angular project where user can Verify order by enter his phone number and get a Verification Code in his phone and then send it back with Firebase verifyPhoneNumber Method.
      I want to change the code from getting the Verification Code of a prompt to an input shown after the user enter his number and click send the code button.



      ngOnInit()
      ...
      firebase.auth().useDeviceLanguage();
      this.windowRef = this.win.windowRef;
      this.windowRef.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container');
      this.windowRef.recaptchaVerifier.render();
      this.provider = new firebase.auth.PhoneAuthProvider();


      sendLoginCode()
      const appVerifier = this.windowRef.recaptchaVerifier;
      const num = this.phoneNumber.e164;
      console.log(num);

      this.provider.verifyPhoneNumber(num, appVerifier)
      .then(verificationId =>
      var verificationCode = window.prompt('Please enter the verification code that was sent to your mobile device.');
      return firebase.auth.PhoneAuthProvider.credential(verificationId,
      verificationCode);
      )
      .then(phoneCredential =>
      console.log(phoneCredential);
      return firebase.auth().currentUser.updatePhoneNumber(phoneCredential);
      )
      .catch(err => console.log(err) );



      I think this function need to be splited and It need to add a function to verify the verification code and execute the rest of the function.










      share|improve this question
















      I am working on an angular project where user can Verify order by enter his phone number and get a Verification Code in his phone and then send it back with Firebase verifyPhoneNumber Method.
      I want to change the code from getting the Verification Code of a prompt to an input shown after the user enter his number and click send the code button.



      ngOnInit()
      ...
      firebase.auth().useDeviceLanguage();
      this.windowRef = this.win.windowRef;
      this.windowRef.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container');
      this.windowRef.recaptchaVerifier.render();
      this.provider = new firebase.auth.PhoneAuthProvider();


      sendLoginCode()
      const appVerifier = this.windowRef.recaptchaVerifier;
      const num = this.phoneNumber.e164;
      console.log(num);

      this.provider.verifyPhoneNumber(num, appVerifier)
      .then(verificationId =>
      var verificationCode = window.prompt('Please enter the verification code that was sent to your mobile device.');
      return firebase.auth.PhoneAuthProvider.credential(verificationId,
      verificationCode);
      )
      .then(phoneCredential =>
      console.log(phoneCredential);
      return firebase.auth().currentUser.updatePhoneNumber(phoneCredential);
      )
      .catch(err => console.log(err) );



      I think this function need to be splited and It need to add a function to verify the verification code and execute the rest of the function.







      javascript firebase firebase-authentication






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 26 at 14:56









      Frank van Puffelen

      265k33 gold badges427 silver badges452 bronze badges




      265k33 gold badges427 silver badges452 bronze badges










      asked Mar 26 at 13:54









      Mohamed AyadiMohamed Ayadi

      62 bronze badges




      62 bronze badges






















          0






          active

          oldest

          votes










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55358888%2fhow-to-change-a-prompt-to-an-input-text-and-wait-the-user-until-send-the-code-in%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes




          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55358888%2fhow-to-change-a-prompt-to-an-input-text-and-wait-the-user-until-send-the-code-in%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현