-
Notifications
You must be signed in to change notification settings - Fork 131
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
How to persist authentication across app restarts ? #210
Comments
Hi, see the readme https://github.com/step-up-labs/firebase-authentication-dotnet#firebaseauthenticationnet-1 |
Hi @bezysoftware , thanks a lot for the quick response. I got it, I need to use UserRepository definition so that the signin information is persisted. And when I come back client.User object is maintained :) One last question if I may: What would be the right way to refresh the persisted authentication information ? I create an account, check User.IsEmailVerified, it is false. I close the app, verify email and re-open the app, it still shows as false. There is a mention to User.Reload() method but this doesn't seem to be available in my case. Thanks |
okay but how do you use this to refresh the token ? |
found it .. readme.md should be updated to include for beginners |
Feel free to send a PR to update the readme. |
I think refreshing the user information isn't implemented right now |
Hello, I am new to Firebase Auth, excuse if I was missing something obvious.
When I run
It successfully returns a UserCredential object with Id Token and Refresh Token in it.
What would be the correct approach to persist signin across app sessions (including restarts) ? Reading about Id and Refresh tokens I think the idea is saving the refresh token to generate a new Id token on the next session however GetTokenAsync method is part of UserCredentials object and it is a quite complex one to re-populate the object.
Reading Firebase Auth documentation there is a section about persistence however I am not clear how this package implements it if at all.
How can I make sure that the user is still signed it after the app is restarted and how can I get a fresh Id Token ?
Many thanks,
Cagri
The text was updated successfully, but these errors were encountered: