In my Cloud Firestore datababase I have a collection named users
. Each user of my app is stored as a document within this collection. My database looks like this:
Firestore-root
|
--- users
|
--- uid
|
--- userName: "Jane"
|
--- creationDate: February 28, 2018 at 1:46:00 PM UTC+2
In the creationDate
property I want to store the date and time of the user when it first time joins my app. I'm using to populate this property using the answer from this post and it works perfectly fine.
The problem is that every time a user signs in, this property is repopulated and I want it only once, when the user joins my app for the first time.
How can I solve this?
Thanks!