0

I'm utilizing the Mailchimp extension in firebase with regular firebase auth, but as I use custom claims to differentiate between people currently subscribed and those who have made an account but aren't currently subscribed, the sample code that firebase provides does not work as it's made for firestore (the following)

{
  "memberTags": ["domainKnowledge", "jobTitle"],
  "subscriberEmail": "emailAddress"
}

Is there a way to automatically tag with a custom claim or does that have to be coded separately (or is mailchimp just not the best tool in general for this)?

daredevil
  • 53
  • 5
  • I'm not sure I understand the use-case fully, but you might want to have a look at https://github.com/FirebaseExtended/experimental-extensions/tree/next/firestore-auth-claims – Frank van Puffelen Jul 19 '23 at 03:49
  • @FrankvanPuffelen this looks like it's going from firestore to custom claims which unfortunately isn't really applicable here, appreciate the attempt though. – daredevil Jul 19 '23 at 03:58
  • Hmm... I thought it was bidrectional, but it indeed seems it's only from Firestore to Auth. Would it solve your problem if it was bidrectional, so also synchronized claims from Auth to Firestore? – Frank van Puffelen Jul 19 '23 at 15:15
  • @FrankvanPuffelen it would be convoluted but yes there's a possible way to use it if it's bidirectional. It honestly feels like there should be a simpler way though, I can't imagine no one else has had this issue before. – daredevil Jul 19 '23 at 20:16

0 Answers0