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
2 answers

Trying to set firebase custom claims and are getting errors - JS Backend

My code: import admin from "firebase-admin"; const path = `./service-account-key.json`; admin.initializeApp({ credential: path, }); // Get uid from user email var uid = ""; const email =…
Psuedo
  • 29
  • 8
0
votes
1 answer

DB.collection is not a function in firebase?

I am trying to connect to firebase realtime database (not firestore) but I get the error that db.collection is not a function. Other answers in StackOverflow are mentioned with respect to Firestore. Thanks for your help. const admin =…
0
votes
1 answer

Trying to setup firebase custom claims and I keep getting an error

I ran firebase init in powershell (inbuilt vscode term) and did its thing, i selected TypeScript, and it generated the files. I also installed dependencies in the script. However, I tried to run this code in an index.ts file and it threw the…
0
votes
1 answer

image does not show in the notification by Firebase Admin in Firefox Developer

i use following code to send notification by Firebase Admin , but image does not show in firefox developer , The image is displayed well in Chrome what should i do ? var path = _env.ContentRootPath + "/private_key_firebase.json"; FirebaseApp…
0
votes
1 answer

Simple access control with custom claim for firebase realtime database not working

All the users for firebase project are authenticated using Phone provider. I am setting custom claim for all users using C# as follows - var claims = new Dictionary() { { "admin", true }, }; var pagedEnumerable =…
0
votes
1 answer

Sending email confirmation and adding data to collection after creating user in Firebase

I've created a rest API for signup. The idea is to create the user using admin.auth().createUser({...}) method and after getting the response send an email confirmation link to the email provided by the user. Another thing that needs to be done is…
user14709104
0
votes
0 answers

Change firebase email base url to custom domain

I am using firebase admin api to generate email links in cloud functions. I have my own locale specific templates and I embed url's generated by below api's in my template. Finally i use nodemailer to send the…
Saurabh Kumar
  • 16,353
  • 49
  • 133
  • 212
0
votes
1 answer

Reactjs and Firebase: one login interface for user and admin or separate login interface?

I'm doing a school project using reactjs and Firestore that has 2 users; user and admin. These are the features: User: User registers on the website. Upon registration, the system will generate a QR code for the user to be scanned. Upon scanning,…
0
votes
1 answer

ASP.NET Core Update HttpContext.User

Does anyone know where HttpContext.User gets set when using Firebase Auth? I'm using: Asp.NET Core 5.0, FirebaseAdmin 2.2.0 In my startup.cs I have this: FirebaseApp.Create(new AppOptions() { Credential =…
0
votes
1 answer

How to add firebase custom claims without admin SDK?

I am developing a Android app with firebase as backend. I heard about firebase admin SDK but I don't know how to create it. I am using firebase console in web interface. Now how can I set customer claims for a user?
Real Tech Hacks
  • 367
  • 3
  • 11
0
votes
1 answer

How do I do a join of two tables in firebase_admin for Python?

I am unable to find a way to join two firestore tables in python. Does anyone have any information on this?
Jahill
  • 78
  • 1
  • 7
0
votes
0 answers

Authenticate *from* Firebase Cloud Functions to custom Node Server

I'm having troubles to authenticate from Firebase Cloud Functions to a custom Node server. Background: I use a custom node + express server to receive calls from authenticated clients coming from our website. I can successfully verify their tokens…
0
votes
1 answer

Firebase Admin Send Multicast not getting called or working

I'm working on django project in which i need to send notifications to the users using firebase admin sdk. but when ever i tried to send notification i see no logs for messaging.send_multicast(message). can anyone help me on this? message =…
0
votes
2 answers

How to verify Google signin (via Firebase) idToken in nodejs backend?

Trying to verify idToken of a user signed in via firebase authentication (Google signin) in nodejs server. Server throws Firebase ID token has invalid signature. Tried verifying with firebase-admin as well as jsonwebtoken with public key from the…
0
votes
1 answer

Firebase admin SDK failed to decode id token

I'm a novice here and this is my first question. I'm making an API with Typescript and Express that connects to my local DB and want to authenticate the user with firebase. I read the instructions on their docs and think I'm doing what they asked,…
1 2 3
99
100