title: Firebase Phone Authentication - OTP received but invalid
body: <p>I have implemented firebase phone authentication for my mobile application based on react-native and built for android mobiles. The firebase authentication process occurs in the backend (PHP/Laravel) and works properly most of the time. However in some cases, the user registers, receives and OTP, however when inputting the OTP I get an Invalid OTP error (mismatch between the one generated in firebase and the one entered).</p>
  <p>The process is as follows:</p>
  <ol>
  <li>User registers</li>
  <li>OTP is sent</li>
  <li>OTP is received</li>
  <li>OTP entered automatically on the mobile (I have tried manual input as well)</li>
  <li>On success, the user is added to firebase (visible from the user table), and then added to the application user list in our backend</li>
  <li>On failure (wrong OTP), the user will not be added to the firebase table and a failure response is sent to our backend and display on the mobile as &quot;OTP Invalid&quot;</li>
  </ol>
  <p>In random occasions, we are getting an invalid OTP response even though the input is the correct one received. This is happening with new numbers registering. The same mobile network and provider is being used.</p>