Skip to main content
Question

User alias is created with delay using Purchases.getSharedInstance().logIn


Forum|alt.badge.img+1

We have encountered an issue where the user alias is created with a delay by using the following API:

In java: Purchases.getSharedInstance().logIn( … )

 

Below is the timeline of our user:

 

Because the delay described above, the Webhook notified our backend service with an AnonymuosID, and we do know about the alias happened afterward. Thus our own service cannot link the user’s REAL user id with the purchases and subscriptions they made.

 

This happens quite often on our side (more than 2% of our users are impacted!!!!), and it has caused a huge data loss already.

 

Please fix this as soon as possible, or let us know, what can goes wrong with the integration.

9 replies

Ryan Glanz
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 383 replies
  • July 24, 2023

Hi,

We’ve outlined some considerations for avoiding anonymous ids here: https://www.revenuecat.com/docs/user-ids#how-to-only-use-custom-app-user-ids

Are you calling logout() or configure() without a custom id?


Forum|alt.badge.img+1
  • Author
  • New Member
  • 3 replies
  • August 11, 2023

Hi @Ryan Glanz 

 

We're calling configure without a custom id because our app doesn't require users to log in, users that do not log in can still use our app and purchase consumables for their single device usage. The real issue here is not about avoiding anonymous ids, but about the timing when the alias happens on server.


Forum|alt.badge.img+1
  • Author
  • New Member
  • 3 replies
  • September 28, 2023

@Ryan Glanz Any updates or advice?


Ryan Glanz
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 383 replies
  • September 29, 2023

Sorry for the delay on this, I sent you an email because I’ll need some account-specific info.


Forum|alt.badge.img+4
  • Member
  • 5 replies
  • January 13, 2024

any updates on this issue, I myself faced this during testing


Forum|alt.badge.img+4
  • Member
  • 5 replies
  • November 12, 2024

Been 10 months and RC has this issue with no comments from the team


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

Hey @f-d-e8d39c,

The community is meant for all users to chime in, and we don’t necessarily respond to all posts. If you do have an issue, always feel free to open up a support ticket here: https://app.revenuecat.com/settings/support
For this issue, it looked like the developer ultimately got the behavior they were looking for my ensuring they had called login() before calling purchase(), and if they hadn’t, they call it right before.


Forum|alt.badge.img

We are facing the same issue. It seems like a racing condition:

 

In our case, the flow is that the user signs up (we then use the Login method), and immediatley showing a paywall screen. some users start the free trial as they see the paywall, but RC is not fast enough and the webhook received with the anonymous user.


Ryan Glanz
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 383 replies
  • February 26, 2025

How about this flow?

1. Use your app’s authentication

2. Use our configure() method and pass in the appUserId (so, no need for login method)

3. Show the paywall (make sure to wait for the configuration to finish, of course)

 

You won’t be able to show the paywall until our SDK is configured, and the user will be identified with the App User Id you pass into the configure method


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