Skip to main content
Question

Original App user id changes after a few reinstalls of my app on Android

  • October 28, 2024
  • 5 replies
  • 182 views

Forum|alt.badge.img+4

Hello, im using the “Transfer to new app user id” method. I don't want to use a auth system in my app. Im using the Webhook to grant users 10 free credits on INITIAL_PURCHASE and tracking the original_app_user_id and aliases in my backend. There is a problem though, when I reinstall the app on Android, the original_app_user_id changes and the old one is not included in the aliases array. So basically I use the same google account on my device but revenuecat references a different user after reinstall of my app and after cancellation of the subscription. My expected behavior is that the userid is bound to one google account and I don’t want that entitlements get transferred if user logs in with another google account. The user should be able to restore purchase if logged in with the same google account the purchase was made on and it should not be bound to the device.

how to handle this without creating a auth system in my app?

thanks in advance 

This post has been closed for comments

5 replies

Forum|alt.badge.img+4
  • Author
  • Member
  • 5 replies
  • October 28, 2024

Also sometimes the original_app_user_id is the first one after reinstall which I'm tracking in my DB like expected, but sometimes after reinstall it's a new one. There seems to be an inconsistency issue with Google Play Store subscriptions. On iOS everything works as expected. I would appreciate any help… Is this maybe an issue with Sandbox testing or is this expected behavior for production?


Forum|alt.badge.img+4
  • Author
  • Member
  • 5 replies
  • October 30, 2024

I also noticed something odd - the sandbox customer dashboard shows three different customers for the same device (and the same Google account). Can you help me understand why that is? 

react-native (android SDK 8.8.0)


kaitlin
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 383 replies
  • November 5, 2024

Hi @cemck,

It is expected that each new install of your app could produce a new app user id - this is one of the use cases for restore behavior to handle. The `original_app_user_id` can change if a user reinstalls and restores purchases, so we definitely recommend listening to `TRANSFER` events and checking the `transferred_to` field against the aliases array and moving the purchases over in your database.

Google Play does tend to have more changes to user identity, and more transfers in general. 


Forum|alt.badge.img+4
  • Author
  • Member
  • 5 replies
  • November 5, 2024
kaitlin wrote:

Hi @cemck,

It is expected that each new install of your app could produce a new app user id - this is one of the use cases for restore behavior to handle. The `original_app_user_id` can change if a user reinstalls and restores purchases, so we definitely recommend listening to `TRANSFER` events and checking the `transferred_to` field against the aliases array and moving the purchases over in your database.

Google Play does tend to have more changes to user identity, and more transfers in general. 

Hey, thanks for the reply! My issue is though that I don’t receive any TRANSFER events in my webhook when I’m not using the .logIn() method in the SDK and purely relying on anonymous ids.
Any idea on why that is?


Ryan Glanz
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 383 replies
  • November 12, 2024

Is this for a user with a purchase, or without? If there are no purchases associated with the user yet, then we won’t trigger a transfer (nothing to be transferred).

If there are purchases, and you have the default Restore Purchases behavior, enabled, then we should transfer the purchase to the user app_user_id. If this transfer did not occur for some reason, the user would need to click your app’s Restore Purchase behavior.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings