I signed up a user in my Flutter app using FirebaseAuth.instance.verifyPhoneNumber()
. This works perfectly and the user shows up in my Firebase Console.
FirebaseAuth.instance.currentUser()
now returns the user for me whenever I open the app. Should I store user info (age, weight etc.) here, or should I create a users
collection in my Database
and link the currentUser().uid
in there?
Also, should I store it on the Database linked against the uid
, or linked against the login info. For example, link a user
to the phoneNumber
and not the uid
. Because if you ever delete the user, but they want to register again, then they will get a new uid
, but their phoneNumber / email
will still stay the same and can therefore still link to their old data.