Questions tagged [firebase-admin]

The Firebase Admin SDK is a set of client libraries which enable App Developers to write more custom behavior for their apps by providing server technologies access to Firebase APIs. Currently, there are libraries for Node.js, Java, Python and Go.

Firebase Admin SDK grants elevated privileges on the server-side, to features like:

  • Firebase Database (Realtime Database and Cloud Firestore)
  • Firebase Authentication
  • Firebase Storage
  • Firebase Cloud Messaging
2205 questions
0
votes
0 answers

Unable to access Google Cloud from ASP.NET Core under IIS - : The Application Default Credentials are not available

I am trying to connect to the Google Cloud FireBase Admin 2.4 from ASP.NET CORE 3.1.10. Tried the following in a Controller where keyFilePath is the full path to a json file containing the credentials of a service account for Google: var defaultApp…
0
votes
1 answer

Firebase admin upload PayloadTooLargeError: request entity too large

I am using Firebase admin to upload a 250MB video file to cloud storage. Heres my code: await bucket.upload(downloadVideoResponse.filePath, { destination, resumable: false }) This code throws the error: PayloadTooLargeError: request entity too…
danday74
  • 52,471
  • 49
  • 232
  • 283
0
votes
0 answers

FCM Malformed Topic Name

I have created a push notification with the rest api and everything works as expected. I have decided to change from the rest api and use admin.messaging().send(message). My topic names are all numbers so the 1st error I got…
0
votes
2 answers

ReferenceError: Cannot access '__WEBPACK_DEFAULT_EXPORT__' before initialization with Firebase Admin in a nx + nextjs app

I have a Typescript Nx + Next.js App running with Firebase (and Firebase Admin). Within this codebase I have a firebase admin util defined as follows - // File ./utils/FirebaseAdmin.ts // import checkConfig from './checkConfig'; import…
Shalom Sam
  • 1,539
  • 1
  • 16
  • 26
0
votes
0 answers

how to change Firestore document data using Google Cloud Functions in node.js

I am trying to write a google cloud function that will check all documents under a collection in every minute and if a boolean parameter after 15 minutes later still false, it will change another document parameter. const functions =…
0
votes
0 answers

Firebase PHP admin sdk auth permission

i am using firebase php admin sdk. I have no problem with user registration, login, update or pulling user data. But no auth permission. It gives a permission error when adding something to the realtime database. How can I give auth authentication…
0
votes
1 answer

Authenticate on Realtime Database using an IdToken using the Go Admin SDK

When using the Firebase Admin SDK in Go, I'm facing an issue where I can't authenticate on the Realtime Database. Here's how I start the database connection: option := option.WithTokenSource(tokenSource) app, err :=…
Martichou
  • 123
  • 1
  • 10
0
votes
1 answer

How to retrieve data in Firebase realtime database?

I have created a new app in Firebase (not Firestore) via the creation Wizard. I have even entered some dummy data into my database via the web UI. How can I retrieve this data from the fireabase-admin SDK? I have initialised my app like so: import…
Stretch0
  • 8,362
  • 13
  • 71
  • 133
0
votes
1 answer

firebase-admin/app module can't be resolved in jest unit test (NestJS Application)

I'm writing Unit-Tests for a NESTJS Application. In the normal app-code the module can be resolved and everything works just fine, but in the unit tests i get this error when importing { initializeApp, applicationDefault } from…
Andreas Rainer
  • 314
  • 4
  • 16
0
votes
0 answers

Firebase Realtime database Connecting issues from NodeJS

I had the same issue in the production environment. Sometimes the node-js server(desktop application) does not connect to firebase's real-time database from starting(installing) then after a few days I try again and it starts working. I don't know…
0
votes
1 answer

Firebase cloud function Admin SDK - listing user - problem with pagination

I've implemented a HTTP callable function to get all users. As you see in my code, the problem is that requestedPageToken (from client call) is the same as listUsersResult.pageToken (returned from listusers function). My client app calls this…
0
votes
1 answer

Firebase Admin Timestamp

I am working with Firebase Admin SDK and having issues with Timestamp. When comparing Timestamps from my documents I was getting unexpected results. On further inspection when printing the Timestamp it appears to be empty. I'm not sure what I'm…
jonthornham
  • 2,881
  • 4
  • 19
  • 35
0
votes
1 answer

How to manage tenants programatically in Google Cloud Platform

I am writing a backend service to manage my tenants in gcp. Specifically, I’d like to be able to create/delete and list tenants, on my node server. The Firebase admin-sdk should enable me to do so. When I try to run it I get this error: Credential…
Raste
  • 376
  • 1
  • 13
0
votes
0 answers

Firebase-admin modular Admin SDK: FirebaseError: Expected first argument to collection() to be a CollectionReference

Using firebase-admin (>10.0.x) which is now modular, we initialize an app like this in Node.JS: import { initializeApp } from 'firebase-admin/app' import { getFirestore } from "firebase-admin/firestore"; import { doc, setDoc } from…
0
votes
0 answers

Get all the documents in a collection - check which of those have a subcollection update all the docs in that subcollection with parent data

thanks so much in advance for your help In firebase admin I would like to run a function to fix a data model issue. I have a collection of documents x each document in x may or may not have a subcollection of documents y I would like to update all…
atx123n
  • 33
  • 2
  • 7