We’re facing an issue where RevenueCat is assigning an anonymous ID ($RCAnonymousID…) to some users, even though our app does not allow access without login, and we only call Purchases.configure() after the user signs up or logs in.
Our Setup:
• Platform: Flutter (with RevenueCat Flutter SDK)
• Auth system: Firebase Auth
• App flow: Users are required to sign in (via Firebase) before accessing any part of the app
• RevenueCat config: We only call Purchases.configure() after confirming that the user is signed in and have access to FirebaseAuth.instance.currentUser.uid
Issue Details:
• In about 10% of cases, we’re seeing a RevenueCat event log that looks like this:
• Created a new alias $RCAnonymousID:...
• All these users are supposedly logged in before we initialize RevenueCat
• For the remaining 90% of users, everything works correctly — i.e., the purchases are linked directly to our userId
Sample Event Flow (from RevenueCat dashboard):
• First seen using the app – shows a timestamp
• Started a subscription... – shows correct product and price
• Created a new alias $RCAnonymousID:...
• Last opened the app – same timestamp as signup
This suggests that the SDK is assigning the anonymous ID and linking the purchase to it, even though we believe we’ve already passed the correct user ID at configuration time.
Questions:
1) Why is RevenueCat still generating an anonymous ID for some users even though we are setting appUserID correctly?
2) How do we resolve this issue?
3) Is there a safer pattern for new user signup + purchase flow to ensure no anonymous ID is created at all?
