firebase-kotlin-sdk
firebase-kotlin-sdk copied to clipboard
Fix android phone authentication
Current behavior blocks sms code user input until auto retrieval timeout is reached.
Documentation states it is not recommended to enable user input after sms code retrieval timeout, we should rather enable user input after code sent. https://firebase.google.com/docs/auth/android/phone-auth#oncodeautoretrievaltimeoutstring-verificationid
So I moved the getVerificationCode()
from onCodeAutoRetrievalTimeOut()
to onCodeSent()
and it works well on my project.
Thanks for the PR! And sorry for the delay in reviewing.
What about JS and iOS, do they suffer the same issue?
Hello, sorry for the late reply! I cannot tell you about the other platforms but I guess not. My iOS coworker did not implement authentication with this SDK. It was a little bit too complex with the suspend function inside PhoneVerificationProvider. I will tell you later about that. We do not have a JS app.