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
🐛 [firebase_auth] Recapatcha appears when I use verifyPhoneNumber #4189
Comments
Hi @afkhalid
Are you facing this on physical as well? Is this on iOS or Android? Could you please fill in the entire issue form? |
Yes I'm facing it on physical as well. It is happening on android, I haven't tested iOS. It's annoying. It happened after I added
|
@markusaksli-nc |
I'm not seeing this on the latest master flutter doctor -v
Maybe ISP specific or something else. Labeling for now. |
Thanks, @markusaksli-nc. Why the ISP would trigger such behavior?! Also, I and Faizan are not from the same country. I can see this in your documents https://firebase.google.com/docs/auth/android/phone-auth It says
and
which for me is what happens and in the logs, it says and then opens the webpage. this both happen in the emulator and physical device. So if I were you I would 1- Try to find out why we get this error 2- Why once we add this line it works fine in physical devices then says cannot detect SafetyNet and popup with reCAPTCHA as the documents say So maybe the other question is. Why emulator and physical device cannot detect SafetyNet and thus goes to reCAPTCHA through a browser?! |
Please could you raise this as a ticket with Firebase support. We only wrap the sdks and don't control any recaptcha behaviour |
@Salakar |
I believe reCAPTCHA appears on physical devices when you enter a phone number that it's not the one on the installed sim. |
@diegogarciar, |
Also, this happens when putting a test number from a verified machine so firebase knows about it and it has the machine's key (SHA1) so it's not even a security threat to say reCAPTCHA is needed. |
What is the progress on this issue guys? Or is anybody really try to sort it out. This issue is making my life miserable. I had to unpublish my app from play store because of this issue. |
I agree with you that official flutter documentation for phone authentication needs to be updated to mention adding androidx.browser and to clarify SafetyNet & recaptcha options |
@Omrankabalan 1- Go to x That may be a bit of work but it will help a lot. Thanks, brother. |
Like when I go to https://console.cloud.google.com/ I didn't create any projects that have anything to do with Firebase so which project will I enable the Android DeviceCheck API for?! Or if I create a project how that will be linked to my Firebase project so when I auth it know I am using that project?! It's a bit confusing to be honest. |
Go to https://console.cloud.google.com/
|
@Omrankabalan @FaizanKamal7 |
@afkhalid Good luck! |
Bug report
Describe the bug
I am trying to implement phone auth in my flutter app. When I call verifyPhoneNumber it opens a browser window that takes me to a Recapatcha before I am able to receive the SMS message and verification code. This shouldn't happen and destroys the whole idea of SMS verification.
Steps to reproduce
Steps to reproduce the behavior:
Follow exact steps in FlutterFire docs here https://firebase.flutter.dev/docs/auth/phone and test in an emulator and after I call that function I am moved to enter a Recapatcha
Expected behavior
The SMS should be received and no browser window should be opened
Additional context
I am facing this in both my emulator and physical devices. This even happens while using test phone numbers added to my project.
This is happening on Android. I didn't yet try in IOS.
You can check this SO question which shows the same problem https://stackoverflow.com/questions/64931073/app-crashes-upon-phone-authentication-after-changing-package-name-flutter
Flutter doctor
Run
flutter doctor
and paste the output below:Click To Expand
Flutter dependencies
Run
flutter pub deps -- --style=compact
and paste the output below:Click To Expand
The text was updated successfully, but these errors were encountered: