All Questions
149 questions
0
votes
1
answer
15
views
Firebase - user customClaims - admin
im trying to find a way how to add to user Admin role via custom claims.
I tried to do it with user creation cloud function, and onCall function, I dont know if claims are assigned, or not, or how to ...
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 ...
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) =...
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....
2
votes
2
answers
105
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
&...
-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 ...
1
vote
2
answers
372
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 ...
1
vote
0
answers
27
views
Cloud Function deploy error in Flutter (JavaScript)
I want to send a welcome email to the user when logging in to Google using Cloud Functions in Flutter Web, and save the user information to FireStore. I want to create a separate admin and project in ...
0
votes
1
answer
401
views
Firebase Cloud Functions. why is functions.auth.user() undefined? [duplicate]
index.js
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();
// Existing helloWorld function
exports.helloWorld = functions.https....
0
votes
1
answer
105
views
Calling an authenticated Firebase Function from a chrome extension
I have a Firebase function that requires authentication per https://stackoverflow.com/a/44500591/82156:
exports.ping = onCall(async (request) => {
if (!request.auth?.uid) {
throw new ...
0
votes
1
answer
157
views
context.auth is undefined when using onCall to define a Firebase Function
I am trying to access the auth.id for the user making this call. context.auth is undefined when I use onCall to define a callable function and invoke it from my app using httpsCallable while a user is ...
1
vote
2
answers
208
views
getSignedURL() called from firebase cloud function gives permission denied error ( firebase-functions v2)
I need to download html pages only for authenticated users, pages are stored in "Firebase Storage" as html.
I get the right action by using the bellow firebase cloud function (v2) (...
0
votes
0
answers
127
views
Firebase Python Function called from Firebase Hosted App
I would like to call a firebase function written in Python from my firebase hosted app. I've followed the documentation here (https://firebase.google.com/docs/functions/callable?gen=2nd#...
0
votes
0
answers
63
views
Why Set-Cookie in the response header is ignored? using httpsCallable from @angular/fire/functions
My goal is to store the session cookie, and use it to create custom token, to share auth between subdomain1.example.com and subdomain2.example.com. If the session cookie is missing, then when user ...
0
votes
1
answer
795
views
Cloud Functions (2nd gen) and the "onCall" method: Why is "request.auth" undefined in SSR page?
Why am I getting a request.auth is undefined in this onCall function?
I am using Firebase Function emulator for this test.
I am trying to call a Firebase function directly from my app like so:
/...