now I am learning flutter for chat app, I need to get currentUserEmail, now I have two ways to save currentUserEmail, a. save it in sharedPreference; b. always get it from FirebaseAuth
So here is my question:
- does FirebaseAuth.instance.currentUser.email Flutter count to one time read from firesbase(since currentUserEmail value will be used multiple times in my app, it may increase the cost)
- is it safe to get currentUserEmail and then save it in sharedPreference, so in the future I can easily get this currentUserEmail from sharedPreference instead of always get this from FirebaseAuth. I am afraid hacker can change this currentUserEmail value locally, so the app may treat this user as someone else.
thank you for any info in advance and keep safe!