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 want to get appId so i can set custom claim accouding to that .
// some other imports
const functions = require("firebase-functions/v1");
const functionsv2 = require("firebase-functions/v2");
// some other code
exports.usercustomclaim = functions.auth.user().onCreate((user) => {
console.log(functionsv2.config().firebase.appId);
});
i am geting this error
TypeError: Cannot read properties of undefined (reading ‘appId’)
New contributor
Abhi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.