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
9
votes
1 answer

Firebase-Admin, importing it to react application throws Module not found error

I'm developming simple React application which uses firebase admin. I have generated react application by using create react app. Then I have installed firebase-admin by using this npm command: npm install firebase-admin --save In my index.js I…
Mr.D
  • 7,353
  • 13
  • 60
  • 119
9
votes
1 answer

Firebase - Share authentication across sub domains using firebase admin sdk

I have done some research about sharing the auth object across sub domains of my app. Apparently firebase's web sdk this setup. My idea is to have a single login website login.myapp.com which can be used by my other apps app1.myapp.com,…
jofftiquez
  • 7,548
  • 10
  • 67
  • 121
9
votes
2 answers

Is there a way to call a Firebase server "function" from within a client app, say with Angular 2?

So Firebase offers something called "functions", which is essentially a nodejs server that has all of the Firebase stuff preconfigured and has all the scaling automatically handled. I'm wondering, is there a way to call a function inside of the…
Stevie Star
  • 2,331
  • 2
  • 28
  • 54
9
votes
3 answers

Sign in with Firebase-Admin using node.js

I am trying to sign in with node.js with firebase-admin, but when I look up there API, they only have sections on update, delete and create. They do have sections on how to get the user by email but if i want to sign in a user should I not be…
Matthew
  • 800
  • 3
  • 12
  • 35
8
votes
2 answers

How to access firebase database from nodejs admin sdk after enforcing Firebase App Check

I have enabled Firebase App Check in my project to ensure all requests are coming only from our app. That has been working well till now (Using RecaptachaV3 as a Attestation Provider for web). However I want to access the database (rtdb) from my…
8
votes
2 answers

Firestore query endBefore & endAt not working as expected

I am using Node 10, firebase 8.0, firebase-admin 9.3.0. I've included a copy of my test code & client side js version. Data Document ID | name | is_visible ----------- | ---- | ---------- 1 | a | true 2 | b | true 3 …
Cleanbeans
  • 655
  • 4
  • 12
8
votes
1 answer

Error: The default Firebase app already exists. Really?

Using the code here: https://github.com/firebase/functions-samples/blob/master/child-count/functions/index.js I get the "app already exists" error when deploying to Firebase. I have only changed the refs to work with my Firebase RTD. It's easily…
Ken
  • 212
  • 3
  • 13
8
votes
2 answers

Firebase cloud function firestore array union

I'm unable to get the array union or increment to work properly in firebase cloud functions. return docRef.update({ object: { count: admin.firestore.FieldValue.increment(1), list: admin.firestore.FieldValue.arrayUnion({ space_id:…
8
votes
1 answer

Enable default sound on FCM notifications for both android and iOS

After several hours searching the web for answers on how to enable the default sound on Firebase cloud messaging notifications, for both android and iOS, I finally figured it out by myself. I could not really find any answers to this problem…
Magnus
  • 895
  • 3
  • 9
  • 20
8
votes
2 answers

Firebase Function returns 400 from get request

My local function works fine running on firebase serve --only functions but once it is deployed to the cloud, I cannot make the same get request to it, using postman. I get the following error on stackdriver: Unexpected token u in JSON at…
8
votes
4 answers

Find the url of uploaded file, firebase storage + python

I was wondering how could I get the url from the file I am uploading to the firebase storage? Here is my code: import firebase_admin from firebase_admin import credentials, firestore,…
dolphin
  • 199
  • 2
  • 9
8
votes
3 answers

Firebase Admin SDK to Log user in from Server

I have been using Firebase Admin SDK in my Node JS code for authenticating users from the server side. The Admin SDK provides a method admin.auth().createUser() to create new users. admin.auth().createUser({ email, password, …
8
votes
2 answers

Firebase Authentication vs Firebase Admin

what is the difference between firebase authentication and firebase admin? As far as I know, firebase admin has authentication features and it can bypass security, unlike firebase authentication. And firebase admin is implemented in server-side…
Lillian
  • 113
  • 2
  • 5
8
votes
5 answers

Send Firebase Reset Password Email After Account Created On Server/Admin

I'm creating a website where businesses can offer my service to their clients/users for free. For a business to add a user (under their business account), the business logs in and inputs one of their clients/users email. I then send the client/user…
8
votes
1 answer

Managing Session Cookies with Firebase and Electron

I am trying to set up session cookies in my Node server, which is the backend for an Electron app. I am trying to follow this guide. https://firebase.google.com/docs/auth/admin/manage-cookies The first thing I am confused about is where this…