How to manage concurrent connections of the same user. Is there any way I can limit how many connections my user can keep active?
I could make my database something like:
"users": {
...
"FAKE-USER-ID": {
"active_connections": 2
}
...
}
And update the key active_connections
whenever a user changes their state.
How cases like connection lost and app crashes would be managed in this scenario? Is there a Firebase native way of doing this?