Best option for user ID

  • 29 September 2021
  • 1 reply

Badge +4

Hello all,


I am struggling with the edge cases related to user identification. 


I am using unique ID created for every user of our app as an identifier. This works for most use cases but there is situations where this is not enough:


User deletes his/her-account and creates new account later:

→ The original unique identifier connected to revenuecat is lost since the account creation always creates a new item into the Database.

→ We can not login to revenuecat since the original ID is lost


Why this is problematic

→ We offer introductory offer to our users, and we need to determine if user has previously had subscription (so is still eligible for introductory offer or no). This way we can determine if we should show the discounted price UI or normal price UI. On Android only way to determine this is to see if user had subscriptions before and that can be done querying the purchaserInfo.entitlements.all from revenuecat-SDK and that is not working if we can not identify first. 


Email would probably be the best option since most propably new account is created with the same email. that, however, is GDPR-incompliant. What about using some hash created from the email?


Any thought? 





1 reply

Badge +4


→ I have written logic that when user account is deleted, we save the email & UserID-pair to DB and if this user returns to our app with a new account, we will see if there has been account before and then identify this user first with the old user ID (already familiar with revenuecat) and after that alias it with the newly created user ID.

→ This seems to work so far with early testing.