0

I see Cloud Functions for Firebase including onUpdate is triggered by CRUD operations on Firebase Realtime Database.
In my project, I need to record which users have written/updated/deleted specific fields. For example:

{
   "news": { 
      `news id`: { 
          "createdBy": `user id`, 
          "title""text": "...",
           ...
       },
       ...
   }
}

So when a user create a new News object. I need to record who created it.
I can do this by the field createdBy but I need a more secure method to get the uid of the user triggered the CRUD operations.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
Colin Wang
  • 6,778
  • 5
  • 26
  • 42

0 Answers0