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

Admin SDK Transaction behavior on Realtime Database

I have been using Admin SDK Transaction on Firestore for a while, I know Firestore locks documents during transaction. But I am not sure it works as same as on Realtime Database because offical document keep bring me to the client side API page, Or…
0
votes
0 answers

Firebase PHP SDK : The token was issued in the future

So I was working with my Firebase project using just html and PHP, and sometimes when I logging in, it keeps telling me that my token was issued in the future. It happens again and again, I have no idea how to stop it. Is there a way to make a new…
Kurokumo
  • 3
  • 3
0
votes
0 answers

Disconnect when listen data change firestore-firebase

I listen data change from firestore. It was working about one hour good And then it was stopped I have code try { InstantiatingGrpcChannelProvider channelProvider = InstantiatingGrpcChannelProvider.newBuilder() …
0
votes
1 answer

How to hide firebase-admin credentials in Next Js

So I am using firebase-admin in Next Js. I used environment variables but can't hide the firebase service account keys because they are not defined in server-side on Next JS. So i had to use NEXT_PUBLIC environment variables. And NEXT_PUBLIC…
0
votes
1 answer

'Unknown field for WriteResult: Collection', exception caused when creating sub collection for firestore db

Here's the syntax I used, I encounter an exception when the third line is executed. fire_client = firestore.Client() def_ref = fire_client.collection('collection_parent').document('document1').set({"key":"value"}) msg_ref =…
0
votes
1 answer

Best way to store Firebase admin private key file for AWS lambda

I'm working with the firebase admin SDK in AWS. the first step is to initialize your app with the credentials file. The main problem I have is that firebase expects a path to the JSON file with the credentials. Not for you to just pass them in the…
0
votes
0 answers

Module not found: Package path ./standalone is not exported from package when build on firebase (SSR)

I'm developing a simple web app usage firebase-admin on next.js(SSR). Then follow a tutorial to try to build on Firebase Functions. However, it is not going smoothly that keeps returning error messages. My dependencies: "firebase-admin":…
0
votes
1 answer

How do I set json file(json file's path) to a value in Azure App settings?

How do I set json file(json file's path) to a value in Azure App settings? I am adding Firebase SDK to the server. I defined "/my-json-file.json" as GOOGLE_APPLICATION_CREDENTIALS key's value. Because "/" means "\site\wwwroot" (root…
0
votes
1 answer

How to recursively list subcollections in Firestore

We back up all our firestore collections daily, using an empty array [] in: const client = new firestore.v1.FirestoreAdminClient(); return client .exportDocuments({ name: databaseName, outputUriPrefix: storageName, …
0
votes
1 answer

Use firebase admin with REST

I'm using Deno instead of node as a runtime, which makes me unable to use firebase-admin. I would like to implement the listUsers from the admin sdk in REST, but have not found any REST api references. Is there a way to use the firebase-admin sdk…
Gabriel Petersson
  • 8,434
  • 4
  • 32
  • 41
0
votes
1 answer

How to query Firebase with Node.js and "firebase-admin" SDK?

After initializing Firebase like this: import * as admin from "firebase-admin" const firebaseApp = admin.initializeApp({ credential: admin.credential.cert(keys), }) export const db = firebaseApp.firestore() I want to get all documents of one…
Juno
  • 211
  • 5
  • 17
0
votes
1 answer

Firestore transactions showing unexpected behaviour when used in cloud functions

I am writing an app that features an inventory in which users can reserve products. I want to ensure that 2 users cannot simultaneously reserve a product at the same time, for this, I intend on using transactions. When using transactions from the…
0
votes
0 answers

FirebaseMessaging is null null and SendMessage fails because of it

I have a code here where I want to use FireBase Admin to send push notifications to IOS and Android. I recieve token, title and body from method. var message = new FirebaseAdmin.Messaging.Message() { Notification…
kajke123
  • 13
  • 4
0
votes
2 answers

How to modify a users firebase authentication token claims?

How can I update a users claims if the map returned is an immutable map? This is example code from Firebase Auth docs on how to update claims: UserRecord user = FirebaseAuth.getInstance() .getUserByEmail("user@admin.example.com"); …
0
votes
1 answer

How would I convert iso dateformat to timestamp using firebase admin

How would I convert the following dateformat 2020-09-18T18:36:15.000Z to Timestamp using the firebase-admin npm package