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
7
votes
3 answers

Firestore - Nested query

I'm really new to firebase and to be honest I find queries hard to write. I'm working on a script in python using firebase_admin and i'd like the query/answer to be in python code, but in any other programming language is fine. Here's my one of my…
user10952539
7
votes
1 answer

java: cannot access com.google.auth.Credentials class file for com.google.auth.Credentials not found

I'm using the firebase Admin SDK and im getting this error at runtime: Error:(22, 36) java: cannot access com.google.auth.Credentials class file for com.google.auth.Credentials not found This is the constructor that is throwing the error import…
Andrew Heschl
  • 359
  • 3
  • 15
7
votes
1 answer

How to delete image stored in Firebase storage after triggering Firestore onDelete in Cloud Function?

I want to use a cloud function background trigger, so when I delete a user data in Firestore, I want to also delete their profile picture in the Firebase storage. the userID is used as the image name of that picture. and the image is located inside…
7
votes
2 answers

Firebase Cookies not saving

I am following this documentation: Manage Session Cookies My app.js looks like this basically sign in the user on the client side on a button click. (function() { // Initialize Firebase var config = { //... }; firebase.initializeApp(config); //…
7
votes
0 answers

Firebase-admin unpredictable read times

I have a Firebase database that clients access via a REST API run on node.js, which then reads from my firebase database using the firebase-admin node client. For most of my endpoints, several concurrent database reads are required. For example,…
7
votes
6 answers

python firebase realtime listener

Hi there I'm new in python. I would like to implement the listener on my Firebase DB. When I change one or more parameters on the DB my Python code have to do something. How can I do it? Thank a lot my db is like simple list of data from 001 to 200:…
Twing90
  • 407
  • 2
  • 5
  • 15
7
votes
0 answers

Are createTime and updateTime documentSnapshotFields to be discontinued on firestore?

I am using the FirebaseFirestore.DocumentSnapshot fields createtime and updateTime on my nodeJS project, but now i find out that these fields are only part of Google Cloud documentation, and can't be find at Firebase documentation for…
MiguelSlv
  • 14,067
  • 15
  • 102
  • 169
7
votes
1 answer

Query by documentId in Firebase Function

When I query data from Firebase Firestore with documentId as field path, I get a different behaviour when running the script on webpage (javascript) and in Firebase Function (Node.js). This javascript gives me perfect…
7
votes
2 answers

firebase.auth(...).signInWithEmailAndPassword is not a function in Cloud Function

I m getting Error while invoked function. I m using LsignInWithEmailAndPassword Method.Any Special Configuration is Require? const functions = require('firebase-functions'); const firebase=require('firebase-admin'); …
7
votes
1 answer

Firebase: using admin sdk to store images

I am trying to store images to firebase storage, I am using node.js. import * as admin from 'firebase-admin'; admin.initializeApp({ credential: admin.credential.cert(serviceAccount), databaseURL: 'https://xxx-app.firebaseio.com', …
Yasir
  • 1,391
  • 2
  • 23
  • 44
7
votes
2 answers

How many topics an app instance can subscribe in FCM?

As mentioned in FCM documents, unlimited topic can be created for one Firebase application. But as the Firebase Admin SDK document: explains an error: messaging/too-many-topics:- A registration token has been subscribed to the maximum number of…
7
votes
4 answers

How to check if current password is valid in firease admin sdk?

I have a firebase powered app. The requirement is to update the account password by typing the currentPassword and the newPassword. On the server (firebase cloud function + admin sdk) i need to check if the provided currentPassword is valid. When an…
AIon
  • 12,521
  • 10
  • 47
  • 73
7
votes
6 answers

Firebase Admin INVALID_APP_OPTIONS error at initializeApp()

I'm trying to connect Instagram OAuth to Firebase through Node.js back-end. I have successfully retrieved Instagram account data including access_token which I want to exchange with firebase-admin's createCustomToken on my Node.js backend. My…
andhika.sw
  • 191
  • 3
  • 8
7
votes
2 answers

How to use Firebase Admin SDK in .NET?

I have a windows desktop app written in VB.Net.My server needs to connect with the Firebase to send updates to the app (Firebase Realtime Database). Right now I am able to do this using the "Database secrets" in the service accounts, but since this…
tempUser
  • 71
  • 1
  • 1
  • 3
6
votes
3 answers

How to set custom auth claims through Firebase and identify platform

I am following the firebase documentation here to set custom auth claims for users logging into my app for the first time using firebase auth + identify platform but it does not seem to be working. When a user logs in for the first time, I want them…