Closed jorxein closed 6 years ago
A good way of retaining auth info after closing the app would be amazing! Logging in every time is too much to expect from people..
For now using the Plugin.Settings plugin to retain FirebaseAuthProvider info between sessions and checking token usability each time app is loaded. Once pull request #36 is accepted we will be able to refresh the firebase token when it expires
still waiting on pull request to be accepted :(
Hey dude, you can do it with this code. I put the Label element to show me when I log in or out.
Label label = this.FindByName<Label>("label");
FirebaseAuth firebaseAuth = new FirebaseAuth();
User user = firebaseAuth.User;
if (user != null) {
label.Text = "Logged";
}
else
{
label.Text = "No Logged";
}
How does that solve the issue? The token still is invalid after an hour (3600 seconds) and the user won't be able to use .WithAuth() with any queries when it expires.. unless I'm missing something?
In Firebase for Android Studio will check if user exist in this phone and works. Is persistent like persistent data. Including for notifications for app closed. If somebody fix this, please tell us!!
Anyone known hoy to check if user log in. Step 1, create user. Step 2, login user. Then close the app Step 3, check if user had log in..