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
5
votes
2 answers

firebase function get download url after successfully save image to firebase cloud storage

I'm having problem getting download url in firebase function after saving image to cloud storage. Below is my firebase http function in typescript to save base64 string to jpeg in firebase cloud storage. when i log result, it always empty. I follow…
phonemyatt
  • 1,287
  • 17
  • 35
5
votes
1 answer

Firebase transaction returns null and completes without error

I have a simple transaction which should return the count of a child node stored in my realtime database and increment it. It might be worth noting this transaction is inside of a firebase cloud onWrite function. The issue is that the data returned…
5
votes
1 answer

FCM messaging with Java SDK: how to handle correctly and differentiate failures

I'm using Firebase Cloud Messaging with Java SDK (com.google.firebase:firebase-admin v 5.9.0). The only way to treat errors in Java code is to catch an ExecutionException: Message message = buildMessage(token,payload); try { String response =…
Germs
  • 347
  • 6
  • 8
5
votes
1 answer

java.lang.NoSuchMethodError when connecting to Firebase from Java

I'm trying to connect my Java web project to Firebase, so I'll be able to store my data in Firestore. I'm using Java Admin SDK, following official guide: FirebaseAdminSDK. Sadly, I'm getting exceptions when FirebaseAp is being…
greenskin
  • 544
  • 8
  • 22
5
votes
1 answer

How do I include my firebase service account key when using functions.config().firebase to init?

I'm initializing my firebase functions like so: admin.initializeApp(functions.config().firebase) I've generated a service account key which I believe I need to do for auth purpouses. It gave me a json table with various key/values. The instructions…
meds
  • 21,699
  • 37
  • 163
  • 314
5
votes
2 answers

Firebase Admin SDK initialization failed from TypeScript

I am trying to import the Firebase Admin SDK in my TypeScript (Nest.js) application. let serviceAccount = require("../../creds.json"); console.log(serviceAccount); const firebase =…
Jay Bell
  • 447
  • 7
  • 20
5
votes
1 answer

How do I send Firebase token to backend (Node / Express) via HTTPS

I have client-side login on my app which is working just fine. Now I need to pass the clients UID to Node. Found this Verify ID Tokens in Firebase docs, but i just don't know how would i actually do this part: "Send token to your backend via HTTPS"
VilleKoo
  • 2,827
  • 2
  • 14
  • 23
5
votes
2 answers

firebase admin failing to query large items

Using firebase admin to retrieve data from a collection in a cloud function fails for large items. Sample code i am using to query the selection from the cloud function is as…
5
votes
1 answer

How to get the current user id using firebase admin?

I am working on an assistant app for which I am writing a cloud function which must retrieve the current user data from Firebase database by using the user id. I am using firebase admin and I referred the docs for firebase admin where they've…
Mustafa Bhatkar
  • 335
  • 2
  • 13
5
votes
1 answer

Firebase Database concurrent data writing

For writing data in Firebase Database I use setValue() in my android app. My question is: can a value of a variable change, if at the same time I change the value using the Admin API?
5
votes
3 answers

Firebase Admin SDK for Android, methods not found

I'm building an Android app backed by a Firebase app, and I would like to be able to create an Admin account that can edit or delete other user accounts. If I'm understanding correctly, the Firebase Admin SDK should allow me to do this. So I…
Russell Stewart
  • 1,960
  • 4
  • 24
  • 31
5
votes
1 answer

Firebase Admin Auth Token Revoked

I am attempting to implement a node.js server to listen to changes in my firebase database. This is my code to initialize the server: var admin = require('firebase-admin'); var serviceAccount =…
5
votes
1 answer

Is the Firebase Java Admin SDK thread safe?

I want to use the Firebase Admin SDK to validate JWT tokens. I am using undertow.io as my HTTP library. Undertow creates multiple thread to handle connections. Do I need to make the FirebaseApp or FirebaseAuth object thread locale, or can I just…
tomwassing
  • 925
  • 1
  • 10
  • 30
4
votes
0 answers

Using Cookies for SSR in Nextjs with Firebase Auth

I am trying to use cookie based auth in addition to the normal clientside firebase auth for my Nextjs application. I have read around the internet and I have come across a few blogs like this one…
4
votes
2 answers

Error in building wheel for cryptography while installing firebase-admin on raspberry pi 3

I was installing firebase-admin using pip on my raspberry pi 3b+ using the following command: pip3 install firebase-admin However it always ends with an error saying "Error building wheel for cryptography" Here is the full error…