I need to get signed in user id when a Cloud Function listening to change in db is triggered
I tried firestore.getAuth()
without success.
I need to get signed in user id when a Cloud Function listening to change in db is triggered
I tried firestore.getAuth()
without success.
I need to get signed in user id when a Cloud Function listening to changes in db is triggered
It is not possible with Cloud Functions for Firestore to access the details of the authenticated user who did the modification that triggered the CF. One workaround is to write the user ID in a field in the Firestore document.
FYI note that, in the other hand, this is possible with the Realtime Database.