adaptyteam / AdaptySDK-Flutter

SDK for growing mobile in-app purchases
https://docs.adapty.io/docs/quickstart
MIT License
95 stars 17 forks source link

Logging a user out and back in again creates multiple blank user profiles in Adapty console #23

Closed danieljimeneznz closed 3 years ago

danieljimeneznz commented 3 years ago

Reproduction steps

  1. Setup and run an adapty application in Flutter (i.e. calls Adapty.activate()). => New blank user (User A) is created in the console
  2. Log in with a user e.g. customerUserId 1234 i.e. Adapty.identify("1234"). => Previous blank user (User A) is now linked to user via customerId 1234
  3. Log out the user with Adapty.logout() => New blank user (User B) is created in the console
  4. Log in the same user as before i.e. Adapty.identify(1234) => Previous user is used for identification (User A).

Continue to log in a user, and logout a user to generate more garbage users in the console.

Expected behavior

Since User B has essentially mutated into User A through the identify call, I wouldn't expect to see User B in the console. (I was curious if this was the expected behaviour by the Adapty team or indeed a bug)

(I tried bypassing this bug by only calling identify on Login but when another user logs in, they mutate the previous users Adapty Profile)

AKyashkin commented 3 years ago

Hey, thanks for your feedback. This is not a bug, this is how system works. We do re-use old profiles in case user identifies with their ids and at the same time we keep those "dummy" profiles in DB. We can't remove such "dummy" profiles for now, but definitely will do that in future.

danieljimeneznz commented 3 years ago

@AKyashkin thanks for the clarification, feel free to close this issue.

aritroper commented 1 year ago

Any update on removing these dummy profiles? I hate seeing them in the console. Is there any reason why Adapty.activate has to be in the App delegate and not on Login?

georgedavid1990 commented 1 month ago

Any updates?

x401om commented 1 month ago

Hi, @aritroper and @georgedavid1990! Since this issue is not directly related to the SDK functionality, I suggest you email this question to support@adapty.io.