I'm developing my first app using firebase. I've run into some problems with the login.
Basically, what I've got so far:
My problem
When a user uses the app for the first time, they don't have an account yet and if they have no internet connection, they won't be able to create one (at least I think so).
My question
What is the best way to handle this? Is there a possibility to get a unique key without internet connection? Should I ask the user to create a internet connection? Other possibilities?
Creating a Firebase Authentication user account requires making a connection to the Google servers. Unfortunately this even applies when you use anonymous authentication.
So currently the only option (within Firebase Authentication) is to have the user connect to the internet to complete the registration.
You can see if the user is authenticated offline only if he has already logged in or registered before, and then he saved the user again in the FirebaseAuth.instance.. but for every request he needs the connection.
In my case I'm using Flutter:
var user = await FirebaseAuth.instance.currentUser();
This offline log status allows you not to present a login or registration page every time the user is offline and opens your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With