Hey @Sofia CHEVROLAT!
I think you’re correct- I don’t think this particular use-case is supported. When ‘logIn’ is called on an anonymous ID, we’ll alias the non-anonymous ID with the anonymous ID. At the same time, we don’t support ‘logOut’ on an anonymous ID.
A workaround for now may be to call the deprecated ‘reset’ method - this should generate a new anonymous ID, although as it’s marked deprecated, this may not be supported in the long term. If you’re just using this for testing, this should be safe to try to use.
Otherwise, I’d recommend deleting the user from the dashboard and/or doing a fresh install of the app to generate a new ID. Let me know if that helps!
Thank you for this thorough answer, Cody! Super helpful!
Have a great day!
Hi Cody,
So actually, I’m a bit baffled by what I’m currently seeing.
I’m configuring with only the API key first.
Then, I’m logging in with $RCAnonymousID:XXXX or its alias _UUUU. They exist in RC. It has my test purchases etc.
I quit the app and restart it.
I then call logIn with a brand new provided ID, that does not exist in RC.
It works in that 0 purchases are shown, and I can purchase new ones.
I purchase something, quit the app and restart it.
I then call logIn with yet another brand new ID, but then it doesn’t work because it shows the previous purchases.
It’s like the opposite of what you mentioned? As in, I can log out from an anonymous user ($RCAnonymousID:XXXX) but not from a Provided User?
I’m very confused. Could you shed some light on this behavior?
I’ve continued to test and actually, everything seems fine in the dashboard and the API: both new users are considered brand new. There is no entitlements for them in the dashboard or via the API.
The second new ID fails in buying with a pop up “You are already subscribed to this”.
The API log shows the following error message “ERROR: There is already another active subscriber using the same receipt.”
Would you know what this means and why I get the error only after on the second try?
Thanks!
Update:
I found this question
and that seems to say that this should never be able to work, but it does the first time…