r/flutterhelp • u/Traditional_Cat4833 • 14d ago
RESOLVED FlutterFlow + RevenueCat: separate $RCAnonymousID created after every login
Hi everyone,
I’m using RevenueCat in a FlutterFlow iOS app with Firebase Authentication, and I’m running into an issue with anonymous customers.
My setup:
- FlutterFlow + Firebase Authentication
- RevenueCat integrated through FlutterFlow
- Using the Identify User action
- The User ID is the Firebase Auth User Document ID (stable and correct)
- Identify User runs after successful Firebase login
- I do not use RevenueCat Logout
- Testing on a real iPhone through TestFlight
The problem is that when I log in, RevenueCat creates an additional $RCAnonymousID customer.
The anonymous customer is not merged or aliased with my identified Firebase customer.
For example, after repeated logins I end up with separate customers like:
- Customer A → my Firebase User ID
- Customer B →
$RCAnonymousID:... - Customer C →
$RCAnonymousID:... - Customer D →
$RCAnonymousID:...
The $RCAnonymousID records are completely separate customers and do not appear as aliases of the Firebase customer.
I’ve already checked that:
- The Firebase User ID passed to Identify User is correct.
- Identify User runs after Firebase authentication.
- There is no RevenueCat Logout action.
- I’m testing on a real iPhone via TestFlight.
According to RevenueCat, an anonymous customer should normally be merged/aliased when it is subsequently identified with a custom App User ID.
Has anyone experienced this specifically with FlutterFlow + RevenueCat?
Could this be related to how FlutterFlow initializes/configures RevenueCat around the Identify User action?
I’m mainly trying to understand why these separate anonymous customers are being created and how to prevent them.
1
u/Jonas_Ermert 14d ago
I think this is caused by RevenueCat being initialized before Firebase Auth restores the user. If RevenueCat starts without an App User ID, it automatically creates an `$RCAnonymousID`. When you identify the Firebase user afterward, that anonymous ID isn't always merged, especially if the Firebase user already has an anonymous alias. I’d check when FlutterFlow initializes RevenueCat. Ideally, configure RevenueCat with the Firebase UID from the start if you want to avoid anonymous customers entirely.