title: How to post data to firebase once user is already logged in
body: <p>I'm new to firebase and I'm making an app with an integrated quiz feature using Xcode, but I can't figure how to post the score of the quiz to firebase. This is what I have so far:</p>
  <pre><code>@IBAction func saveScore(_ sender: Any) {
  
      let scores = self.lblScore.text!
  
      let db = Firestore.firestore()
      let dict = [&quot;score&quot;: scores]
      db.collection(&quot;users&quot;).addDocument(data: dict)
  }
  </code></pre>
  <p>This posts the score to firebase, however it posts in a separate document. I want it to be posted to the document of the user that is logged in. Any idea on how to fix this?</p>