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

how to get notified about changes in firestore using firebase admin sdk

i am makin a chating app and the user needs to be notified wheneer new notification comes. so i am using firebase admin sdk onSnapshot function. but the problem is how can i listen to changes deep inside the multiple collection and documents. i…
0
votes
1 answer

How to upgrade to Node.js SDK Admin SDK v10 (modular SDK) getMessaging & getFirestore calls?

I am not finding very detailed explanations how to upgrade to Node.js SDK Admin v10 https://firebase.google.com/docs/admin/migrate-node-v10#use-modules-instead-of-namespaces I try to import messaging as per the docs import {getFirestore} from…
giorgio79
  • 3,787
  • 9
  • 53
  • 85
0
votes
1 answer

admin.messaging() is not a function while on "firebase-admin": "^11.3.0",

I've been trying to send a notfication to topic "All" and the console log shows error: Notification sent failed: TypeError: admin.messaging is not a function Code: // The Cloud Functions for Firebase SDK to create Cloud Functions and set up…
0
votes
0 answers

Firebase Messaging With Spring Boot:Unknown error while making a remote service call: Unexpected error refreshing access token

I am currently trying to use FCM in spring boot to send push notifications to android app. However, I get this error "Firebase Messaging With Spring Boot:Unknown error while making a remote service call: Unexpected error refreshing access token". I…
0
votes
1 answer

Importing user with PBKDF2 hash to Firebase

I am trying to import users to Firebase Auth from a MongoDB database using a Node script with firebase-adminSDK. In the legacy system passwords are hashed using PBKDF2 SHA256 with 25000 iterations and stored in the database as hex strings with a…
Christian R
  • 1,545
  • 3
  • 13
  • 17
0
votes
1 answer

How to use setDoc with Firebase-Admin with Typescript in firestore?

I have config/firebase.ts: import { initializeApp, cert } from 'firebase-admin/app'; import { getFirestore } from 'firebase-admin/firestore' const firebaseAdminApp = initializeApp({ credential: cert({ privateKey:…
Shamoon
  • 41,293
  • 91
  • 306
  • 570
0
votes
0 answers

I am getting this error admin.auth.verifyIdToken is not a function using node js and firebase admin sdk

I am getting token from firebase and stored in frontend and then send as a request to node.js and verify the token but before verifying it send error that verify-Id-Token is not a function.
0
votes
2 answers

Firestore Python SDK - count() aggregation

I'm using Firebase Firestore in my Python project (with their official Python SDK) and having trouble performing count() aggregation. This funciton is supported according to their docs. However, they do not provide Python example ( they do in other…
0
votes
1 answer

Sync Realtime DB with Authentication users list

I'm creating all users from Firebase console, Now I wanted copy all users to realtime db under users node. Below is my Google cloud function exports.getAllUsers = functions.https.onRequest((req, res) => { cors(req, res, () => { …
0
votes
1 answer

How to combine query firestore firebase admin using node js

Anyone can help me please, i want to combine the query firestore using node js and firebase-admin, this is like sql join. i try with this code and this doesn't work well, is there any other away ? let projects = []; snapshot = await…
0
votes
0 answers

firebase-admin & npm run dev issues

I'm having two problems with my code. First, I can run the front-end part without any problems. I can access the site, there is no problem with that. But when I enter the command "npm run dev" to run the back-end part, I get PS…
0
votes
0 answers

Why can't I import com.google.firebase.database in my java app after upgrading firebase-admin from 6.12.2 to 9.1.0

My java application creates Google Cloud Functions. It works when the pom.xml is: com.google.firebase firebase-admin 6.12.2 However after upgrading the…
0
votes
1 answer

How can I use .NET Core FirebaseAdminSdk for Unit Testing with Moq

I have been working on .NET Core FirebaseAdminSdk. I want to write unit tests for my own services that are using FirebaseApp class. FirebaseApp is a sealed class and there is not any interface to moq it. Is there any way to mock FirebaseApp…
0
votes
0 answers

firebase-admin auth().listProviderConfig() returns no providers

Hoping someone can help... my firebase function's call to listProviderConfig() always returns nothing (providerConfigs: []) even tho I have 3 providers configured: export const providers = https.onRequest((req, res) => { const { type = 'oidc' } =…
Eric
  • 935
  • 1
  • 8
  • 23
0
votes
1 answer

NodeJS firebase-admin cannot send email verification link

I'm using node firebase-admin to manage user as follow. function (req, res, next) { const { email, password } = req.body; const auth = getAuth(); const userRecord = await auth.createUser({ email, password }); …