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

Google Firestore Deleting Multiple Fields

I have a firestore. I am trying to delete a specific record from the document 'idAvailable'. However, the id is not deleted from the idAvailable table when we hit this endpoint: http://localhost:5001/us-central1/reserveId which is defined in the…
0
votes
1 answer

Upload image files from node js app to already existing collection in firebase storage

I'm working on a project with an Android Developer who uses Flutter and firebase. He has an already existing Database on Firebase where images from user uploads are stored. Now, I'm building an admin dashboard using Node js and it is required that…
0
votes
1 answer

Cannot find namespace 'FirebaseFirestore' - Node.js, Express, Typescript

I'm using the Firebase Admin SDK in my Express + Typescript server. I'm trying to use Firestore's method withConverter() However, I get the error "Cannot find namespace 'FirebaseFirestore'.ts(2503)". How can I deal with…
0
votes
6 answers

How to convert date to timestamp javascript

Im trying to create a new document in firestore using a cloud function. However i am unable to save the date as a timestamp rather, it's saved as a string currently. How it is right now What i need to achieve Snippet of my cloud function await…
0
votes
1 answer

In firebase cloud function the child is self-deleting

When I add a transaction in the function below, the child of the "guncelLig" is automatically deleted. When I remove the second transaction there is no problem, it works very well. this code work correct : for (let i = 0; i < users.length; i++)…
0
votes
1 answer

firebase Functions TimeStamp convert it to string

const signupTime =admin.database.ServerValue.TIMESTAMP database.ref(`/admin/vendorOrder/${vendor}/${userID}`).set(signupTime); console.log(signupTime); i want the time value while in database it returns correctly in consol log it…
0
votes
0 answers

Query data from cloud firestore - Python

I have a query that I use to fetch data from cloud firestore .but it throws me a key error. Not sure what is wrong.the code below. import firebase_admin from firebase_admin import credentials from firebase_admin import firestore import pandas as…
0
votes
0 answers

iOS Push notifications using firebase and nodeJS

I am trying to get push notifications working for iOS applications for a nodeJS server. I have been able to configure it correctly for android using FCM tokens that are being sent to me. But I am unable to do the same for iOS. I tried to google…
0
votes
0 answers

Next JS + firebase: both admin and front together?

I am having quite an issue, browse the entire stack overflow to find answer but unfortunately no luck yet. My issue is the following: I have a Next JS app, deployed to vercel; I am using their serverless API. So I am using firebase-admin library in…
0
votes
1 answer

Use query data from Firebase Realtime DB as input for another function

So I'm using Firebase Realtime Database to store some data and would like to use the results of a query, as an input for another function (generate signed URLs). My code is as follows: // initialize the empty list let lista = [] // define the async…
0
votes
1 answer

Get newly created document ID in firebase functions error

I am trying to get the newly created firestore document id and use it in the same cloud function, but am getting some error! Here is my cloud function: exports.createNewGroup = functions.https.onCall((data, context) => { if (!context.auth) { …
Mansa
  • 2,277
  • 10
  • 37
  • 67
0
votes
1 answer

How to get uid in response from admin-sdk collection in firestore

The following code works great to retrieve all the items in the collection. However, the uids are not available here and I need them to be able to compare with other userRefs. app.get("/api/all-users", (req, res) => { let arr = [], i = 0; …
Starfs
  • 412
  • 1
  • 5
  • 18
0
votes
1 answer

Cannot retrieve data from Firebase Real-time Database with JAVA Admin SDK using Event Listener

I'm accessing the Firebase Real-time database from a SpringBoot App with privileged access to the database. That's why we use the JAVA Admin SDK. All is set up and works correctly. We use authentication without issues, and storing data works as…
0
votes
1 answer

Firebase Realtime Database - how to manage database rules using java sdk

I would like to set the database rules for my realtime database using the java sdk. I created a FirebaseDatabase object but I wasn't able to find out how to get/set the database rules using it. val options = FirebaseOptions.builder() …
Clyde Barrow
  • 1,924
  • 8
  • 30
  • 60
0
votes
1 answer

Firebase User Authentication

Below is my working GET API, however it is using admin.firestore. As I am a new programmer, I am having difficulties incorporating the Authentication portion app.get("/", async (req, res) => { const snapshot = await…