Skip to main content

All Questions

0 votes
0 answers
41 views

Persistent 401 Unauthorized Error on Firebase Callable Function Despite Valid Client Authentication [closed]

Summary of Problem: I am experiencing a consistent 401 Unauthorized error (FirebaseError: The function must be called while authenticated.) when invoking a Firebase Callable Function (https.onCall) ...
Abbas Anwar's user avatar
0 votes
1 answer
47 views

Declaring Firebase auth trigger error: "TypeError: Cannot read properties of undefined (reading 'user')"

I am trying to create a firebase function that essentially listens to an event where a user created using the firebase authentication and then it creates a new record in the real time database where ...
Yanir Aton's user avatar
0 votes
2 answers
62 views

Firebase Functions v2 onCall returns 401 Unauthorized despite "auth: VALID" in logs

I'm encountering a persistent issue with Firebase Callable Functions (v2, Node.js 20 runtime) where calls from my React frontend consistently fail with a 401 Unauthorized error, even though the server-...
Mars M's user avatar
  • 1
0 votes
0 answers
19 views

Deploying Firebase user().onCreate() Function, undefined 'user' error [duplicate]

This is my index.js file: const functions = require('firebase-functions'); const admin = require('firebase-admin'); admin.initializeApp(); exports.createUser = functions.auth.user().onCreate((user) =...
Caden Wright's user avatar
0 votes
1 answer
43 views

How to deploy a gen2 Google Cloud function that triggers on Auth events (e.g. user.create)

Using gen1 it looks like this gcloud functions deploy AuthUserCreate --runtime dotnet6 --no-gen2 --entry-point AuthUserHandler --trigger-event providers/firebase.auth/eventTypes/user.create but a) ....
Mark's user avatar
  • 570
0 votes
1 answer
126 views

firebase.auth.user().onCreate won't deploy because of "TypeError: Cannot read properties of undefined (reading 'user')"

This is my code: exports.createExample = functions.auth.user().onCreate((testUser) => { functions.logger.log("inside the auth trigger ", testUser.uid); return null; }); This trigger ...
stroopwafel's user avatar
0 votes
0 answers
39 views

How to properly pass authentication to cloud functions when calling from chrome extension

This is cloud function I'm using to access Firestore: const functions = require("firebase-functions"); const admin = require("firebase-admin"); admin.initializeApp(); exports....
Muhammad Usman's user avatar
2 votes
2 answers
104 views

firebase-functions has no exported member 'auth' [duplicate]

This piece of code is watching for the user auth event: export const onUserAuthenticated = auth.user().onCreate(async (userRecord) => { const adminFirestore = getFirestore(); ... package.json &...
pax's user avatar
  • 1,945
0 votes
1 answer
39 views

Creating firebase user with authentication information from Salesforce

I have a scenario where I am doing OAuth2 authorization to Salesforce and I get in response access token, refresh token etc. I can of course use the access token to get the user info from Salesforce. ...
jani_r's user avatar
  • 731
-1 votes
2 answers
137 views

How do I solve this 401 error whenever I run my firebase functions?

I don't have any software experience, I just started using AI to build something for myself in late November. I'm working with a React web app and I'm trying to deploy it in production. I'm trying to ...
user29219329's user avatar
1 vote
2 answers
364 views

Firebase Cloud Function - Cannot find module 'firebase-functions/v2/auth'

Cannot find module 'firebase-functions/v2/auth' or its corresponding type declarations. This is error I get on import { onDelete } from "firebase-functions/v2/auth"; What I tryied from other ...
Dima Malko's user avatar
0 votes
0 answers
22 views

i want get appid in this function exports.usercustomclaim = functions.auth.user().onCreate((user) => {});

I want get appid in this function exports.usercustomclaim = functions.auth.user().onCreate((user) => {}); I am using app in my project and I want to set up custom claim for that app. That's why I ...
Abhi's user avatar
  • 1
0 votes
0 answers
31 views

Firebase Callable Function 401 Unauthorized in Flutter App with Require Authentication

I have a Flutter app where users log in with Firebase Authentication (email/password). The app calls a Firebase Callable Function deployed on Google Cloud Functions (Gen 2). The function works with ...
RAITON's user avatar
  • 375
0 votes
0 answers
53 views

Firebase Cloud Functions Unauthorized Issue

I'm implementing a user login feature using Google and Apple Sign-In. The Firebase Authentication works, and I can see the authenticated user in the Firebase Console. I'm also able to fetch the user's ...
LeoNard's user avatar
  • 300
0 votes
1 answer
58 views

Use http Google Cloud Functions "Require Authentication" with Firebase

In my front-end, I'm using the Firebase authentication and the firebaseAuth.currentUser?.getIdToken(true) function to get the token and send it as an Authorization: Bearer {token} header to the Google ...
domanskyi's user avatar
  • 753

15 30 50 per page
1
2 3 4 5
52