So I'm trying to understand how Firebase works. I'm using Firebase cloud for the Database. I have created a collection like this:
'groups': {
'some_group_name': { ... data ... }
'other_group_name': { ... data ... }
}
Also each user enters email and password when entered to the app. On the sign up, he chooses the group name. For example in the sign up he will set username, password and some_group_name. But How do I connect between the currently login user and it's group in the database? The only data that Firebase authentication saves is email and password.
Do I need to create another collection users like so?
"users": {
"some_user_name": "some_group_name"
}