capawesome-team / capacitor-firebase

⚡️ Firebase plugins for Capacitor. Supports Android, iOS and the Web.
https://capawesome.io/plugins/firebase/
Apache License 2.0
382 stars 98 forks source link

bug: Successive Calls to signInWithPhoneNumber or linkWithPhoneNumber Fail Without any Error Output #724

Open howlettga opened 6 days ago

howlettga commented 6 days ago

Plugin(s)

Version

6.1.0

Platform(s)

Current behavior

If I make successive calls to signInWithPhoneNumber or linkWithPhoneNumber using the same phone number, it silently fails. The PhoneVerificationFailedEvent event does not fire, neither does the PhoneCodeSentEvent.

If I wait some amount of time between calls, it succeeds. 30 second interval fails, 60 second interval succeeds. iOS always succeeds without any interval.

Expected behavior

The PhoneCodeSentEvent event fires or the PhoneVerificationFailedEvent event fires.

Reproduction

https://github.com/robingenz/capacitor-firebase-authentication-demo

Steps to reproduce

  1. In an Android Device environment
  2. With standard configuration
  3. Run the signInWithPhoneNumber method successively to resend the verification text repeatedly
  4. Check for any event to fire.

Other information

This seems to be potentially a bug in the underlying firebase android sdk. I assume the verifyPhoneNumber implementation is pretty straightforward to bubble up events. I can try to submit a bug there instead if that's the case.

Capacitor doctor

$ npx cap doctor 💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 6.1.2 @capacitor/core: 6.1.2 @capacitor/android: 6.1.2 @capacitor/ios: 6.1.2

Installed Dependencies:

@capacitor/cli: 6.1.1 @capacitor/core: 6.1.1 @capacitor/android: 6.1.2 @capacitor/ios: 6.1.2

[success] iOS looking great! 👌 [success] Android looking great! 👌

Before submitting

robingenz commented 2 days ago

I don't have time to look at it at the moment but PRs are welcome.