Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6-digit code verification fails if phone number has country code other than +1 #1991

Open
vijtheveg opened this issue Aug 9, 2021 · 2 comments
Assignees

Comments

@vijtheveg
Copy link

vijtheveg commented Aug 9, 2021

  • Android device: Nexus 5 (emulator)
  • Android OS version: API 23
  • Google Play Services version: 4.3.8
  • Firebase/Play Services SDK version: com.google.firebase:firebase-auth:21.0.1
  • FirebaseUI version: 8.0.0

Step 3: Describe the problem:

In the Firebase UI on Android, the country code specified with the phone number is not honored when the OTP is being entered. As a result, OTP validation always fails. This was not happening on FirebaseUI version: 7.2.0

Steps to reproduce:

  1. Specify phone numbers +91-8637224557. Note, country code dropdown is shown expanded for some reason (why?) - see attached image "Opens with dropdown expanded"
  2. Press the validate button, solve reCAPTCHA if presented

Observed Results:

See image titled "Note country code"
In the page where the 6-digit code needs to be entered, the phone number shown is +1-8637224557 instead of +91-8637224557 - the country code is wrong. As a result, code verification fails

Expected Results:

The correct phone number is shown and code verification succeeds. Also, country code dropdown is not shown expanded when the UI starts.

Relevant Code:

Code is essentially same as that shown in the sample below. Also, my code has not changed in a while (note also that this scenario works as expected in FirebaseUI version: 7.2.0 - this is a regression in version 8.0.0
https://firebase.google.com/docs/auth/android/firebaseui

Note country code
Opens with dropdown expanded
Country code is wrong here

@AdityaDarke2
Copy link

yes even in my case i have to manually type the code in the box

@Shailevy
Copy link

Shailevy commented Sep 7, 2021

It seems that whatever the user select in the country code the phone is sent to PhoneNumberVerificationHandler.verifyPhoneNumber is the the initial country code the screen opened with

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants