title: Default value in Firestore
body: <p>I am using Firebase to handle my authentication and other back-end calls for my Android Project (kotlin). Whenever a new user is registered, it can perform one action inside my application for free. The actions normally cost 1 credit.</p>
  
  <p>Inside the users collection I want to set a default value (for column credits) for all new registered users. I could sent this information from my application to firestorm, but I believe this could be reverse engineered letting the user sent a higher default value to the back-end.</p>
  
  <p>Then I was thinking about Cloud Functions. I could create a function that gets triggered whenever a new user is created. </p>
  
  <pre><code>exports.onUserCreated = functions.auth.user().onCreate(event =&gt; {
      // logic here
  });
  </code></pre>
  
  <p>But I was wondering if any other solutions are here for this problem?</p>