General
When I use the following cloud function, the creation of Auth users works, but no Firestore document is created.
import { identity } from "firebase-functions/v2";
import * as admin from "firebase-admin";
admin.initializeApp();
const firestore = admin.firestore();
export const createfirestoreuser = identity.beforeUserCreated(async (event) => {
await firestore.collection("users").doc(event.data.uid).create({
"id": event.data.uid,
// TODO: Add defaults
});
return;
});
The blocking function is set to createfirestoreuser
:
But it seems that the cloud function isn’t triggered: