Skip to main content

All Questions

0 votes
1 answer
127 views

Firebase functions emulator get actor user information

I need to construct specific linked documents when Firestore object is created, and I need to know who created the specific document. Based on documentation I should be able to use ...
pjotr_dolphin's user avatar
2 votes
4 answers
1k views

How to run firebase blocking function (beforeUserCreated) in emulator suite?

After searching for numerous hours all over the web and asking ChatGPT, I have found no solution. I have a Firebase Project (Web App) and I am using Gen2 Javascript Node for Firebase Functions. I have ...
Brandon Haynes's user avatar
1 vote
0 answers
370 views

Firebase Functions: Authentication. onDelete() triggers when a new user is created

Update 04-10-2023: I updated firebase-tools on my system, and now my triggers work as they should. If anyone runs into the same issue in the future, consider doing the same. To update, I ran npm ...
Flying Wizzy's user avatar
2 votes
0 answers
317 views

How can I properly connect my React Native application to a Firebase Emulator Suite?

I have been working on a react native application using a bare workflow. I have a Firebase project set up with Authentication and a Realtime Database which is already working with the app using live ...
Karl Hernandez's user avatar
3 votes
0 answers
1k views

Failed to load function definition from source: Failed to generate manifest from function source: Error: Cannot find module 'firebase-admin/auth'

I'm getting the following error while trying to deploy any function to firebase functions: Command: firebase deploy --only functions And this is the output i deploying functions i functions: ...
Ricardo B P's user avatar
5 votes
0 answers
606 views

How to generate Password reset link through Cloud Functions

I’m trying to send a password reset email to a user through a cloud function using the generatePasswordResetLink method. However, when the URL is generated and I click on it, I get this error: { &...
MrRobot's user avatar
  • 1,177
1 vote
1 answer
4k views

Where should I run firebase init and what is a source control root in a Cloud Functions project?

I'm adding a custom authentication system to my app using Firebase CLI. This is where I'm at: Initialize a Firebase project Many common tasks performed using the CLI, such as deploying to a Firebase ...
user16375788's user avatar
9 votes
2 answers
3k views

How to call a firebase functions from a unit test using Firebase Emulators?

I have the firebase emulators running. My application can call a firebase cloud function that can create a custom user claim if the user is allowed to (depending on a value in the database) I'm trying ...
Simon Tran's user avatar
  • 2,130
0 votes
1 answer
578 views

How do I create a user in the firebase emulator via cloud function?

When trying to create a user programmatically via a cloud function while using the emulators, I consistently get an error about credential implementation. I am failing to see any credential issues ...
JaredGibb's user avatar
1 vote
2 answers
890 views

How to print email verification URL from Firebase Auth in Emulator?

I am using the Firebase Emulator for local testing. I have a signupUser Firebase Function that uses Firebase Auth to sign up users (and does some extra work). Both of them use the Emulator, and the ...
Gábor Pintér's user avatar
2 votes
2 answers
1k views

Firebase createCustomToken() returns an invalid token in local emulators

I am using firebase authentication to handle user accounts for my web application. When a user enters valid login credentials I am using the firebase admin SDK to generate a JWT in a cloud function, ...
Nwalzer's user avatar
  • 21
5 votes
2 answers
4k views

How to authenticate firebase cloud functions in Functions Emulator using the users stored in Firebase Authentication emulator?

My firebase cloud function contains protected routes that can only be accessed when passed a valid IdToken in the request header. cloud functions API looks like this functions/index.js const ...
Naresh's user avatar
  • 1,271
2 votes
0 answers
218 views

How can I test firebase auth triggers locally?

This is my code const functions = require('firebase-functions'); exports.doSomething = functions.auth.user().onCreate(function(user) { const userJsonString = JSON.stringify(user.toJSON); // ...
Hard_Veur's user avatar
  • 501
3 votes
0 answers
2k views

Firebase Error "Auth Emulator does not validate JWTs"

I am trying to test my auth function for firestore in the emulator suite. Is it normal to get this error when trying to authenticate a user via google? This doc from Firebase seems to suggest that ...
Niamh Flynn's user avatar
0 votes
0 answers
202 views

Is there a way to obtain a Firebase Auth token using the onCall function in the Cloud Functions emulator?

I'm a beginner in Firebase Functions and I'm trying to get the user's token authenticated by calling the onCall function. I wonder if there is any way to get the token for this function Index.js ...
PedroG333 Productios's user avatar

15 30 50 per page