This deployable Firebase function is used to create a new document with an ID corresponding to a newly created user's UID.
I created this gist so that this code could be easily re-used in future development projects that use Firebase as a backend.
To delete a user's document in the 'users' collection when their Firebase Auth account is deleted, use the following pre-built extension. https://firebase.google.com/products/extensions/delete-user-data