Firebase onCreate add custom claims to the auth.user
问题 I am trying to add a custom claims, isRegistered to firebase. My firestore has another user collection to keep register info records. Now I am trying to keep a isRegistered custom claim but I can not seem to get it work. exports.addRegisteredRole = functions.database.ref('/user') .onCreate((snap, context) => { return // **I added this later, but the issue still remains.** admin.auth() .setCustomUserClaims(context.auth.uid, {isRegistered: true}) .then(() => { console.log('done', snap) return {