In iOS, as per the official docs, there's no method to set a timeout duration for the phone number verification code (or even know the default one). Could some Firebaser clarify why is it so? What's the default timeout duration? If possible, how could one set it in iOS?
On the other hand, in Android, all is good: https://firebase.google.com/docs/auth/android/phone-auth#send-a-verification-code-to-the-users-phone
FirebaseUI takes a different approach where they show a timer before they allow the user to resend the code (they use 15 seconds). This is a better approach as even if the expiration is provided, it will be inaccurate due to various latencies in the flow and the value is likely to change as Firebase Auth has the right to change that for security reasons. Otherwise, it could be used for brute force attacks.
The onCodeAutoRetrievalTimeOut
timeout for Android is unrelated. It is the timeout for code auto retrieval before you ask the user to provide the code and not the timeout for code entry. Auto retrieval is an android feature only.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With