Skip to main content

 

Hi everyone,

I am encountering an issue (which I should have tackled a long time ago) with a limited number of users. In my apps, I usually set the RevenueCat App User ID to the Firebase notification token that is received from Firebase. I noticed a few users having their subscription expired on a User ID, only for it to be transferred over to a different User ID, only to then be transferred back to the old User ID (so it would expire on the new user ID), and the cycle keeps on going. These are users with more than one device, who are buying on one device, and restoring on a second device.

According to https://www.revenuecat.com/docs/getting-started/restoring-purchases,

“For example, if UserA buys a subscription, then UserB logs into your app on the same device and restores transactions, UserB would now have access to the subscription and it would be revoked from UserA.”

This explains the behaviour I am seeing, but I found it to be unexpected, since I would expect the subscription to be linked to the Store ID as a source of truth, and not necessarily to the user ID which I set for each user. I understand that setting the same user ID across platforms would keep that entitlement granted for that particular user, which is a nice feature, but it causes chaos in my case.

My apps have no accounts, so I have no easy way of linking two devices belonging to a user together so that I only send one User ID. I am using Ionic for cross platform development, and all the libraries that allowed storage of preferences to iCloud and Android's Data Backup service are pretty much dead (and if the backup was turned off, saving an ID there wouldn’t have worked anyway). I guess I would need the “Share between App User IDs (legacy)” option in RevenueCat, which does not exist anymore.

After reading

If an anonymous ID restores and the owner of the receipt is an identified App User ID, we will resort to the specified restore behavior and transfer the receipt to the anonymous user. And finally, if an anonymous ID restores and the owner of the receipt is also anonymous, the anonymous identifiers will be merged (aliased).

i am starting to believe that the best option might be to stop logging users in, and if one user gets his/her subscription expired, then log them out. Or I guess I could log out everyone right away (I’ve read the documentation again, and I don’t see mentioned that they’ll loose entitlements if they are subscribed and I log them out). This way, because they’ll have anonymous IDs, each time an anonymous ID will restore and the owner is anonymous, these identifiers will be merged/aliased and the subscription will be shared between them. Unless I am missing something obvious, I think that this might be the best way to quickly resolve these issues. I would need to display their anonymous user ID in the app in case they need support or I decide to grant them entitlements from the RevenueCat Dashboard, but other than that, everything should be fine.

Has anyone else encountered this issue? Does anyone have a suggestion on how I could tackle this?