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
1 answer

Firebase admin: Cannot read property 'cert' of undefined

I'm trying to set up firebase in in my node.js server. In deploy.js I am setting up up like this: const admin = require('firebase-admin/app'); const serviceAccount = require('../serviceAccountKey.json') admin.initializeApp({ credential:…
Nina
  • 499
  • 6
  • 16
0
votes
2 answers

Getting Firebase Client Config key/values from within Firebase Admin backend?

Context: Backend gets firebase client config key/values (apiKey, authDomain, etc) and passes it to client Client uses said config to set which Firebase App it initializes into Node backend I've been browsing the firebase-admin npm module and have…
0
votes
0 answers

Sending Android notification via .Net Firebase Admin SDK with unknown channel_id raises OnMessageReceived

i tried to setup an android notification channel for sending a message like this: public override void OnCreate() { base.OnCreate(); var chanList = new List(); chanList.Add(new…
0
votes
1 answer

firebase onAuthStateChanged listener run instantly when user is logged in or not?

//initialize auth change listener useEffect(() => { auth.onAuthStateChanged((user) => { if (user) { router.replace('/') } }) setInitializing(false) }, []) //*handled by login button const login = async (e:…
0
votes
1 answer

How to connect back end to front end with firebase admin and express

I want to pass data from /api/firestore/read.js to mainServer.js. It does have the document, it prints, but does not return the data. mainServer.js app.get("/api/profile", async (req, res) => { const uid = req.user.uid; const userReader = new…
Maya Rahto
  • 49
  • 1
  • 5
0
votes
1 answer

Firebase Functions: when to call initializeApp/deleteApp

I have a variety of functions for Cloud Functions that use things derived from firebase-admin/app's initializeApp(). Since multiple functions use this, I had the idea of calling initializeApp() close to the beginning of the Typescript/Javascript.…
0
votes
2 answers

Connecting to Firestore with Firebase Admin SDK Causes App to Freeze

I am trying to use Firebase Admin SDK in a Django app using a service account. I followed the instructions as per the official documentation. However, the app freezes at the point when Firebase Admin SDK is attempting OAuth2 authentication. My code…
lubani
  • 1
  • 2
0
votes
0 answers

Error fetching access token Firebase Cloud Functions

I am trying to deploy my Firebase Cloud Functions using firebase deploy --only functions. My functions do get successfully deployed, but I get this warning message in the console: @firebase/database: FIREBASE…
0
votes
0 answers

firebase auth - determine if user is anonymous

I'm trying to run a script that will mark anonymous users with a flag in firestore. For that I'm getting all firebase auth users with firebase-admin's auth listUsers. But I'm not sure how to identify whether a user has an actual account using one of…
0
votes
1 answer

Custom authDomain in firebase-admin SDK?

I have been looking to the firebase-admin SDK documentation and the discussions groups and can not find any tips to generate a signInWithEmailLink with my domain server-side. Is it possible to custom the signIn link in server-side with my domain? Or…
Pierre
  • 114
  • 1
  • 13
0
votes
1 answer

Java/Spring using Google Cloud firebase-admin conflicts with google-cloud-storage

I have been using the firebase-admin sdk to authenthicate all requests to a simple REST api running on springboot. The dependency before was only: com.google.firebase firebase-admin
0
votes
1 answer

Cannot install firebase-admin package on PyCharm

I cannot install firebase-admin on PyCharm and make it work. I have already installed firebase-admin in the terminal using: pip install firebase-admin Output when I run this code: Requirement already satisfied: firebase-admin in…
BX07
  • 123
  • 1
  • 10
0
votes
0 answers

No such file or directory for serviceAccountKey.json

when i run this code import firebase_admin from firebase_admin import credentials from firebase_admin import firestore cred = credentials.Certificate("serviceAccountKey.json") firebase_admin.initialize_app(cred) i get this error File…
Oliver
  • 1
  • 1
0
votes
1 answer

Firebase Admin update function calling multiple callbacks in nodejs

I know for a fact that reading data from firebase with firebase admin returns multiple callbacks. that is why I use ref.once(), like example below: const ref = db.ref('clients'); ref.once('value', (snapshot) => { res.send(snapshot.val()); },…
0
votes
0 answers

NodeJS: Firebase Admin SDK is not initializing

I am trying to run the below cod which initialises the Firebase Admin SDK, and send a notification message. const admin = require('firebase-admin/app'); const errorCodes = require('source/error-codes'); const PropertiesReader =…
PeakGen
  • 21,894
  • 86
  • 261
  • 463