Create firestore cloud function -- 2

Job ID: 36914736

Budget: €15 – €80 EUR

I'm looking for someone that can create a firestore function for logging purposes. I need someone that can start right away and finish soon.

I want to keep an audit log for certain events:

Login/logout (including failed login)
PW change
Add/edit/delete records
All login should be done using cloud functions. Some references:
https://blog.emad.in/audit-logs-for-firestore-documents/

Audit logs for Firestore documents



These fields are created in firestore:

datetime -> the datetime (Brussels time) the action was performed

user -> authenticated user

action -> one of these:

user login successfully
user login failed
user logout
user updated password
created document
deleted document
updated document
olddata -> if it's an update of a document, the old data

newdata -> if it's an update of a document, the new data

IP -> IP of the client

deviceinfo -> Info about the device (ANdroid/IOS/web/...)

referencetype -> type of document that was created/deleted/updated. For example users or addresses

referencedocument -> reference of document that was created/deleted/updated.



Furthermore, each document that is created trough the whole firestore should have these fields added via a cloud function:

created_at = Date.now()
created_by = auth.currentUser ? auth.currentUser.uid : null

each document that is updated should have these fields:

updated_at = Date.now()
updated_by = auth.currentUser ? auth.currentUser.uid : null

Bijlagen
Related categories: Google Cloud Platform Google Firebase