Open rashidotm opened 5 months ago
Reproducible using the plugin example app and the steps outlined above.
It seems to happen when the app is first installed. Ideally, tapping the submit button on the keyboard triggers the verification but clicking the verify button is required in some cases and in other cases, just tapping the submit button on the keyboard triggers the verification
cc @lesnitsky
I have a guess that this problem is caused by something in the auto OTP read functionality
I have been toying with this a little bit:
Removed LabelOverrides
from code and see if the issue is still reproducible.
--- result: yes the bug reproduces.
--- conclusion: remove LabelOverrides
from the bug code sample.
Removed locale: const Locale('ar', 'SA')
& supportedLocales: [const Locale('ar', 'SA')]
--- result: now each time I have to enter the international dial code 966
for SA then navigate to number field and enter it. The bug does not reproduce.
--- conclusion: keep locale configuration in code sample
Is there an existing issue for this?
What plugin is this bug for?
Firebase UI Auth
What platform(s) does this bug affect?
Android, iOS
List of dependencies used.
flutter pub deps -s list
Steps to reproduce
code sample to reproduce bug
```dart import 'package:firebase_auth/firebase_auth.dart' hide PhoneAuthProvider, EmailAuthProvider; import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_ui_auth/firebase_ui_auth.dart'; import 'package:firebase_ui_localizations/firebase_ui_localizations.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'firebase_options.dart'; FutureExpected Behavior
the OTP verification starts and the user gets signed in.
Actual Behavior
sometimes the verification does not start (blocked by something? I am not certain) and another click (sometimes multiple clicks) on verify button is required to verify OTP. in other instances, I have to go back to main login page and retry entering the phone number and request another OTP. I notice that this happens when the app is launched fresh and not when signed out and then trying to sign in again.
Additional Information
I used this with a test phone number that was added to firebase authentication. When I try the same with a real phone number I end up receiving multiple SMS messages from Firebase. This makes the auth costs almost double for my project.![image](https://github.com/firebase/FirebaseUI-Flutter/assets/12709757/1451c1af-97c4-4c14-a52e-2eaf79942fb5)
Here is a screen recording for the issue. in the video you notice the first sign in does not pick the OTP confirm button click and I had to click verify. In the second attempt (in the same screen recording) the OTP confirm button works right away. https://github.com/firebase/FirebaseUI-Flutter/assets/12709757/c6508b8c-9100-4f1e-9ad4-792811ffbb8d