I have found reference to this method of initializing firebase functions with a unique UID for the purpose of constraining it with database rules, but I keep getting the error
Error: Can't determine Firebase Database URL
I realize that I can retrieve the DatabaseURL from environment variables, but before I do that, I want to know if I'm doing something wrong because the examples I have seen have not had to do that for Firebase Functions.
import * as functions from "firebase-functions";
import * as admin from "firebase-admin";
admin.initializeApp({
...functions.config().firebase,
databaseAuthVariableOverride: { uid: "functions" }
});