Question

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

  • 27 July 2023
  • 1 reply
  • 58 views

Badge
  • New Member
  • 0 replies

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

Userlevel 6
Badge +8

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