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

Why do I keep seeing warning "Estimating config based on GCLOUD_PROJECT"

This warning is puzzling me. I know it appears when you call initializeApp without arguments, and I understand that the warning is very appropriate under those circumstances. A configuration based on the project id is valid for my project, and so to…
Thijs Koerselman
  • 21,680
  • 22
  • 74
  • 108
0
votes
1 answer

Read an additional document in a transaction after using one transaction.get already

I am quite new to Firebase and NoSQL databases and I am developing server-side. My goal is to read two collections in one transaction (and lock the included documents for consistency). On the one hand I want to read up to 499 documents from…
0
votes
1 answer

Firebase Admin NodeJS SDK: TenantAwareAuth.createSessionCookie() throws unsupported tenant operation

When implementing a tenant aware auth instance using Firebase Admin SDK I cannot use the following method. Code: // defined elsewhere: locals.tenantAuth = getAuth().tenantManager().authForTenant(tenantId) async createSession (locals) { …
0
votes
1 answer

How to further search the Firebase database

I made an example database at the bottom of this question. In my Admin application I would like to be able to search directly for the status of the user. If I do a search by Key I must go to the Users then the user-1 and finally This method is a big…
0
votes
1 answer

Disable user account after firebase authentication time period

I would like to set a period to automatically deactivate users. Example: after 7 days disable user x Or a way to register user with default disabled true I'm currently registering this way using pyrebase and pyqt5 def register(self, screen): …
0
votes
1 answer

How do you use the Firebase Admin SDK to determine the experiment variant for a user?

I have an A/B experiment and I would like to programmatically determine which experiment variant a user falls into on our backend. Is this possible?
0
votes
1 answer

How to apply unknown query operators to a collection reference on Firebase Client

I have written a GetCollectionAsync method for querying collections on Firestore. As long as I want to get the whole collection documents, it works fine. Now I want to introduce query operators such as: WhereEqualTo, WhereIn,…
Oignon_Rouge
  • 196
  • 1
  • 11
0
votes
1 answer

Attach listener to any Firestore collect change

I have a document structure of: /uploads/${USER_ID}/items/${UUID} I can successfully listen for changes on the document at the end of the path, for example firestore .collection("uploads") .document(configService.getUserId()) …
Chris
  • 3,437
  • 6
  • 40
  • 73
0
votes
1 answer

How to get all custom token of a firebase user?

I create many custom token by admin const admin = require('firebase-admin'); const claims = {}; const UID = ""; // admin.auth() .createCustomToken(UID, claims) .then((customToken) => { // new token is customToken }); How I can get all custom…
Tuan Nguyen
  • 2,542
  • 19
  • 29
0
votes
2 answers

Why is my read query to Firebase Realtime Database so slow?

I have a database in a Firebase Realtime Database with data that looks like this: root |_history |_{userId} |_{n1} | |_ ... |_{n2} |_{n...} Nodes n are keyed with a date integer value. Each n node has at least 60 keys, with some…
Wing
  • 8,438
  • 4
  • 37
  • 46
0
votes
1 answer

firebase javascript compare timesamp by seconds

I have a firebase database with some dates written down in what I think is the seconds format. I need to check if a day has passed since that date. admin.firestore.Timestamp.now()._seconds; is what I am using to get the current date. I now need to…
0
votes
1 answer

How To Setup Custom Claims In My React Website For a Login Page

I want to set up custom claims to a certain number of users let's say 5 users would be admins on my website. I want these 5 users to be able to log in through the login page which would redirect them to the dashboard. but I still don't fully…
0
votes
1 answer

Firestore OR queries using Java

I want to perform OR query operation in Firestore using Java client. I am trying to merge the queries. Code : FirebaseFirestore rootRef = FirebaseFirestore.getInstance(); Query firstQuery = rootRef... Query secondQuery = rootRef... Task firstTask =…
0
votes
1 answer

Empty object for Firebase server timestamp

I´m getting an empty object for the admin.firestore.FieldValue.serverTimestamp(), below is the screenshot of the document being stored in Firestore: Here´s the code for creating the message object (that corresponds to the screenshot above): import…
0
votes
1 answer

How to use an emulator for each instance of firebase_admin app, in the same project

What I'm trying to do is connect an emulator to an instance of firebase_admin for admin authentication and another instance for web authentication in the same api. The problem is that i cannot set the host of each emulator for each instance of…