How to protect firebase Cloud Function HTTP endpoint to allow only Firebase authenticated users?

With the new firebase cloud function I’ve decided to move some of my HTTP endpoint to firebase. Everything works great… But i have the following issue. I have two endpoints build by HTTP Triggers (Cloud Functions) An API endpoint to create users and returns the custom Token generated by Firebase Admin SDK. An API endpoint … Read more

Query based on multiple where clauses in Firebase

{ “movies”: { “movie1”: { “genre”: “comedy”, “name”: “As good as it gets”, “lead”: “Jack Nicholson” }, “movie2”: { “genre”: “Horror”, “name”: “The Shining”, “lead”: “Jack Nicholson” }, “movie3”: { “genre”: “comedy”, “name”: “The Mask”, “lead”: “Jim Carrey” } } } I am a Firebase newbie. How can I retrieve a result from the data … Read more

What’s the difference between Cloud Firestore and the Firebase Realtime Database?

Google just released Cloud Firestore, their new Document Database for apps. I have been reading the documentation but I don’t see a lot of differences between Firestore and Firebase DB. The main point is that Firestore uses documents and collections which allow the easy use of querying compared to Firebase, which is a traditional noSQL … Read more

Google firebase check if child exists

Edit 2; worth putting on top: I think it is worth mentioning that this is actually downloading all data at this snapshot just to check whether any data exists. You should be mindful here. If the reference is huge (e.g. actually the root reference and not a specific child/property) then you should either find a deeper node you … Read more