title: Expire/delete documents from Mongo based on condition
body: <p>I know that it is possible to create a TTL index which will delete all data indexes after e.g. 60 minutes: <a href="https://docs.mongodb.com/manual/tutorial/expire-data/" rel="nofollow">https://docs.mongodb.com/manual/tutorial/expire-data/</a></p>
  
  <p>I want to implement a feature which will delete data based on passing or failing a condition. For example:</p>
  
  <pre><code>user = new mongoose.Schema ({
    isAuthenticated: Boolean
  })
  </code></pre>
  
  <p>If a user does not authenticate within 24 hours lets delete him from database - I come from SQL Server background and haven't got much experience with Mongo. How would I do that? Any ideas? Stored procs?</p>