Setting User-Specific Configurations in Firebase Remote Config

179 Views Asked by At

I'm working on a project where I need to enable certain configurations in Firebase Remote Config based on individual user emails. I tried couple of methods, but couldn't achieve what I want.

Approach 1 : saving user email with setUserProperties({ email: user?.email }) and also create email property in custom definitions.

Approach 2 : Create a custom audience with same email definition and use the 'exactly matches' option to check valid user email IDs.

enter image description here

Looks like both option are not working. How to get this done using both Firebase Remote Config & Analytics. My rest of the flags are working fine except this one with condition.

Tried below code to set email of user and enable configs based on the emails:

const unsubscribe = onAuthStateChanged(auth, (user) => {
   setUser(user);
   setUserProperties(analytics, {
     email: user?.email,
   });
   setLoading(false);
});
0

There are 0 best solutions below