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