Scenario:
I’m facing an issue with Firebase authentication in my Flutter app on iOS devices. Here’s the full scenario:
Google Login:
Google login works fine if the email I’m trying to sign in with has already been logged in before and exists in the Firebase database. However, if I try to log in with a new email that’s not in the Firebase database, it fails and throws an error.
Email/Password Login and Registration:
Email/password login works perfectly for users with valid credentials who already exist in the database.
The issue arises with registration: I can’t register new users. While login with email and password works, registration fails.
Firebase Data:
Apart from the authentication issues, I’m able to retrieve data from Firebase smoothly, and everything works fine within the app.
Device-Specific Behavior:
The problem occurs only on a real iOS device. Everything works fine when I test on the iOS simulator.
When I deploy the app to TestFlight and test it on a physical device, the registration and new Google login functionality don’t work.
Any ideas or suggestions to troubleshoot this would be really helpful!