Category "firebase-admin"

Firestore: How to insert a document with automatic id while enforcing unique field value?

In Firestore, I have a collection of fruits containing documents with automatically generated ids, and a name property. I want to insert a new fruit document, w

Firebase Functions "subscribeToTopic" works only for the first time

For some reason, I can't subscribe users for more than one topic Here is my code: exports.subscribe = functions.https.onCall((request, response) => { conso

Access Firebase access token through Firebase Admin PHP SDK

I have generated myself a service account with .json file for Firebase Admin PHP SDK authorization. Aside from that, I would want to use the same service accoun

Pushing a task with firebase-queue not working

I am trying to use the queuing module base on top of Firebase. I use the following code to push tasks import admin from "firebase-admin"; admin.initializeApp(

Firebase-admin Firestore node.js share logic with modular v9 js sdk

What is the recommended way to share Firestore api logic (between the admin node.js and the js web) when upgrading to the web v9 modular sdk? The way I did it b

How to use `firebase-admin` inside firebase functions using ES2015

Nothing I do here seems to work, I can't find an example anywhere that actually seems correct This: import { initializeApp } from 'firebase-admin/app'; Throws:

Create user with firebase admin sdk that can signIn using email and password

I'm using firebase admin SDK on cloud functions to create users using admin.auth().createUser({ email: someEmail, password: somePassword, }) now I want us

Firebase Admin SDK with Java

I am trying to setup firebase admin sdk in a Java project. Following the steps at https://firebase.google.com/docs/admin/setup#add_the_sdk I successfully added

Module Not Found: Can't resolve 'http2' when importing firebase-admin

Failed to compile ./node_modules/@grpc/grpc-js/build/src/channel.js Module not found: Can't resolve 'http2' in '/Users/Michael/Development/Proje

Firebase admin: list all users returns empty array

I have an https-callable firebase cloud function to return all users as an array of their userRecords. I push each of the userRecords into an array which I late

Why is data retrieved from Firestore returning empty array when there are subcollections present?

I am trying to retrieve data from my the my firestore database using angularfire2. This is what my current database looks like. I have a users collection that c

How can I update more than 500 docs in Firestore using Batch?

I'm trying to update a field timestamp with the Firestore admin timestamp in a collection with more than 500 docs. const batch = db.batch(); const serverTimest

FIrebase deploy error: Cannot find module 'firebase-admin'

I recently started getting the error below when trying to deploy to Firebase (after having done so successfully in the past). I'm not sure what might have chang

Firebase Admin - Uncaught exception in Firebase Database runloop (4.1.5)

I'm running an app on Firebase Admin. So this code worked the first time I ran it, but after a few weeks I tried it again and I've been getting this error after