Skip to main content
Question

Login doesn't change Customer ID

  • January 16, 2025
  • 3 replies
  • 30 views

Forum|alt.badge.img+4

When a user first enters our app, they are setup as an anonymous user and get RevCat’s anonymous ID. This happens via using `Purchases.configure(revcat key)`. Later should they login with a named account from our system, we use `Purchases.shared.logIn(customID)` to update the RevCat user with our customer identifier. 

The issue is that after doing this and checking `Purchases.shared.customerInfo()` for the ID, the initial anonymous ID is returned rather than the custom ID supplied at login. 

Should the login method not change the user’s ID when checking their `customerInfo`? 

 

 

This post has been closed for comments

3 replies

jeffrey_bunn
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 300 replies
  • January 17, 2025

Hi ​@Scott! If the named account is new to RevenueCat (i.e., doesn’t already have an anonymous alias), we will alias the anonymous and identified users together and treat them as one user going forward. More information on this is available here. If you’ve enabled webhooks, all aliased IDs will be present in the aliases array.


Forum|alt.badge.img+4
  • Author
  • Helper
  • 6 replies
  • January 17, 2025

Hi ​@jeffrey_bunn - Thanks for your response. I understand the alias process but I am asking about the ID that is returned by customerInfo. Will that not return the specific custom ID given after using the login method? I know from the alias that I can get back to the custom number if needed but I was expecting to directly see the customer ID I gave at login moments prior.

Thanks. 


jeffrey_bunn
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 300 replies
  • January 24, 2025

@Scott CustomerInfo will return the original app user ID supplied, so if you configure the SDK without providing a custom app user ID (which is a common flow), the original ID will be the anonymous ID and will remain in customerInfo. The identified ID is considered an alias, and is present in webhooks and the API. 

Can you share your use case for wanting customerInfo to return the custom ID? I’m happy to share this with my SDK team - perhaps we can return the aliases array in the SDKs as well as webhooks/API.


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