Skip to content

PhoneAuthProvider doesn't work as expected #677

@vfutia

Description

@vfutia

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:

  1. 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 the verificationId that comes from Firebase so that you can manually trigger a call to credential(). Am I wrong? Is there a way to manually submit the verification code that I'm not seeing?

  2. The iOS interface of PhoneVerificationProvider doesn'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 a FIRAuthUIDelegateProtocol and 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!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions