I'm making an application with a Message object which has sender and receiver properties.
I'd like to assign these properties Users that live in the Auth' tab of Firebase Console (fb auth-ed).
Since my application's functionality only needs to read data from the users, I thought I don't need to add them to the realtime database, just access them through FIRAuth (which I'm assuming is the internal representation of the Auth' tab on Firebase Console).
I can get the 'current user' like this:
FIRAuth.auth()?.currentUser
And this will be the 'sender' property of a Message.
But for the 'receiver' property I want to grab a User (that the sender will choose from a drop down of fb contacts) from the fb auth-ed ones listed in the Auth' tab of Firebase Console. For recipient, I need to be able to do something like this (pseudocode):
users.find(where uid == current_user.uid)
Is it possible to do this directly without User table(s) in database? Do I really need to copy over entries from Firebase Auth to Firebase Database? Shouldn't there be a better way to get non current users from Firebase? Does anyone else think that's really bad design (for just being able to read an entry)? Aren't I then responsible for the maintenance of those entries?
Appreciate pointers to specific reading too!
For clarity, I'm not trying to query an entry in the realtime database tab of Firebase Console. I'm trying to query the User object that Firebase saves from Facebook (which is visible in Auth' tab of Firebase Console).