I have been working on phone number authentication with flutter and firebase.
I have a weird behavior and I don’t know where to look.
I have activated play integrity in play console. To be honest, I am sure if I have done everything right.
In my code I have something like:
await FirebaseAppCheck.instance.activate(
androidProvider: AndroidProvider.playIntegrity,
appleProvider: AppleProvider.debug,
);
When I deploy the app on a physical phone (S20) via USB I get the sms verification code and it works.
But the same version is also published as internal test in play console and as a tester I have downloaded the app. But I get verification failed when I entered the sms code.
Unfortunately the debug logs are not printed in Android studio.
2
Answers
Well, I managed to get crashlytics working. I had the google-services.json at the wrong level. I could then see that the error was:
It seems to be that I am calling
signInWithCredential
twice. I have to look into it.Check these points:
1.Play Integrity API: Ensure it’s enabled and properly configured in Google Cloud Console.
2.SHA Certificates:Verify debug, release, and Play Store SHA certificates are in the Firebase console if the app is in the Play Store.
3.App Check: Ensure tokens are validated correctly; add debug tokens for testing.
4.Firebase Authentication: Confirm settings, SMS quota, and check usage logs for errors.
print
statements oradb logcat
for logs since they’re missing in Android Studio.Review Play Integrity setup if the issue persists.