title: Sign in with phone using firebase getting error 400 and captcha
body: <p>I'm trying to sign in on my react app using firebase with phone.
  I am using a useContext to creat the login function and I use it in my signIn.js component.</p>
  <pre><code>const signIn = (phone) =&gt; {
          const recaptchaVerifier = new RecaptchaVerifier('recaptcha-container', {},
          auth);
          recaptchaVerifier.render();
          signInWithPhoneNumber(auth, phone, recaptchaVerifier);
      }
  
  
  
      // display form
      const [modalState, setModalState] = useState({
          signInModal: false
      });
  
  
      return(
          &lt;UserContext.Provider value={{modalState, toggleModals, signIn, auth}}&gt;
              {props.children}
          &lt;/UserContext.Provider&gt;
      )
  </code></pre>
  <p>This is a useContext component</p>
  <p>and in my sign in page:</p>
  <pre><code>const handleForm = async (e) =&gt; {
      e.preventDefault();
      if(input.current[0].value.length &lt; 10){
        setValidation(&quot;Number not correct&quot;);
        return;
      }
      try{
        const res = await signIn(phoneNumber);
        console.log(res);
        /*
        .then(res =&gt; {
          console.log(res);
          window.confirmationResult = res;
        })*/
        //setPhoneNumber(&quot;&quot;);
        setValidation(&quot;&quot;);
        //console.log(cred);
  
      }catch (err) {
        console.log(err);
        setValidation(err);
      }
    }
  </code></pre>
  <p>I get an error 400 I don't know why...</p>
  <p>EDIT:
  <a href="https://i.stack.imgur.com/wDvYp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wDvYp.png" alt="enter image description here" /></a></p>