ARTICLE AD BOX
I’m currently building a subscription feature using Firebase Authentication for login and RevenueCat for handling in-app purchases. I’ve run into an issue when users log in with a different account than the one used on the store (Google Play or App Store) on their device. In my case, a user logs in with account A (which is still on the free version), but the device is using store account B, which already has an active Professional subscription. When user A tries to upgrade, the system immediately detects an active subscription and treats user A as already being Professional, even though they never made a purchase with that account.
From what I understand, this happens because RevenueCat reads the subscription status from the store account, while my app relies on Firebase user identity as the main reference. This creates a mismatch between subscription ownership and the logged-in user. Currently, I’m using Firebase Authentication and RevenueCat SDK without any custom mapping to an App User ID (still using the default/anonymous setup).
My question is: what is the best practice to handle this scenario? Should I always bind RevenueCat to the Firebase UID so the subscription truly follows the logged-in user? How can I ensure that a subscription only applies to a specific user and is not automatically picked up from the store account on the device? Also, how should I handle edge cases where a user logs in with a different account on a device that already has an active subscription? I want to make sure the subscription doesn’t “carry over” to other users on the same device.
