Spent a while searching out a solution to what seems a simple problem but... How can I get the current users details inside a cloud function (when not using an functions.auth trigger)? I'm sure there must be a simple solution to this. (I hope)
Thanks for the replies... Just done that but how would I get the /user/uid from the Firebase DB within a storage triggered event? e.g.
exports.addUploadInfoToDatabase = functions.storage.object().onChange(event => {
console.log("firebase storage has been changed");
// need to find the uid in here somehow
admin.database().ref(`/user/uid`).push({testKey:"testData"});
})
Applogies if I've missed the point in your replies.
Thanks...