Skip to main content
Question

Firebase custom claim not set after Apple Promo Code for new Users

  • July 20, 2025
  • 0 replies
  • 32 views

Forum|alt.badge.img

We are using flutter and firebase custom claims, which work great for the normal in app purchase flow.

We use `rc.Purchases.logIn` to associate the firebase user id.

We now have set up apple Promo Codes for our monthly subscription offer.

This also works as expected for users that already have an account (i.e. the firebase id is already known to revenue cat).

Now the issue:

When a non-existing user follows the promo code link and makes the “purchase” of our monthly subscription via that promo code, revenue cat does not yet have the firebase id (since it does not exist yet).

When that person now downloads the app and creates a firebase account, we again use `rc.Purchases.logIn` to tell revenue cat about it.

I can see in the revenue cat dashboard that that association has worked.

But even after the user has called restore purchases, their id token never gets the expected custom claim.

This post has been closed for comments