Skip to main content
Question

RevenueCat does not seem to remember the original userId set for a google account

  • July 27, 2023
  • 1 reply
  • 74 views

Forum|alt.badge.img+1

Here's an overview of my system:

My app requests a new user ID from my backend. It uses the obtained ID by passing it to the Purchases.logIn() method.

When I get the original user ID from the customer info given from the login callback, it sets the original userid (UID) into its app data.

 

Turns out when I wipe out the app data and repeat the process, the getOriginalid() method returns the same newly regenerated ID used during relogin instead of returning a different id; not considering that the same google account is logged in.

I also tried changing the transfer behavior in the Dashboard, but to no avail.

 

I want my app to obtain the original id, even when app data is reset

 

Is there any real way that I can ensure the same user is logging in, even when App data is compromised?

 

1 reply

cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 497 replies
  • July 31, 2023

Hey @shr!

I wouldn’t recommend setting your user identify based on the original app user ID field in Customer Info - this field is expected to change over time as users are potentially merged depending on transfers. Instead, I’d recommend logging in your SDK with the exact user ID you would expect your user to have from your backend.

For example, if you have an authentication system, you should identify your SDK with that database ID after authenticating.

If you don’t have a stable user ID, I’d recommend instead relying on RevenueCat’s anonymous user IDs.


Reply


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