Skip to content
Advertisement

Tag: firebase

Add field separately to firestore document

The following code creates a firestore collection and adds data to it: I want to create another function which adds a field to the document at a different time. I have the following function but am getting the error “TypeError: collectionRef.update is not a function” Answer Build a DocumentReference to the document you want to update, then use the update()

Firebase Auth: Edit UID

Is it possible to to change a user’s UID in Firebase programmatically? There can’t seem to be a way to do so manually within Firebase’s console. Answer TL;DR: If you need to specify the UID, you’ll need to create a new user with that UID. You can’t directly change the UID, but I was able to hack something together using

Firebase Cloud Functions for Firestore are not triggering

Cannot get Firebase Cloud Functions for Firestore to trigger on onWrite of my collection. Trying to setup device to device push notification for chat app. Function is deployed and on Pay as you go plan, however, changes in document, updates or create in “chats” collection is not triggering. Firebase cloud messaging is supposed to send a push and write to

Firebase firestore cloud functions showing Error: Invalid use of type “undefined” as a Firestore argument

I have a project to add currency details into the firestore database and my project is doing with ionic 3 Whenever I add a new document to the collection a trigger function onCreate() will execute and update the document named ‘updated’. But the trigger function always showing an error. sombody please help.. i have spent lot of time on it.

Advertisement