firebase-kotlin-sdk
firebase-kotlin-sdk copied to clipboard
PhoneAuthProvider doesn't work as expected
Maybe this is a lack of understanding on my part but it doesn't appear that the PhoneAuthProvider works as one would expect. I'm working on a Kotlin Multiplatform project and have created an Android specific implementation of PhoneVerificationProvider and and iOS specific implementation as well. I am triggering calls to PhoneAuthProvider().verifyPhoneNumber() in common code and pass it the PhoneVerificationProvider from the respective platform using expects/actual.
There are two things that don't make sense to me:
-
On the Android side, there doesn't appear to be any way to actually submit your SMS code to Firebase. In the code, it looks like it's only automatically done for you after the timeout expires.
getVerificationCode()is called when the timeout triggers and whatever that returns after the timeout, ready or not, is what gets sent to Firebase. Additionally, there is no way to get access to theverificationIdthat comes from Firebase so that you can manually trigger a call tocredential(). Am I wrong? Is there a way to manually submit the verification code that I'm not seeing? -
The iOS interface of
PhoneVerificationProviderdoesn't make any sense to me and I have no clue how to use it. This interface does not include a timeout. You also have to specific aFIRAuthUIDelegateProtocoland I have no idea what that is or where to get one. It's really unclear how this is supposed to work in the iOS context.
Any help I could get with this would be appreciated!!
Did anyone solved this or have some hints?
@Daeda88 @nbransby @michaelprichardson Could you help us on this please?