Anonymous users
Anonymous identity works well when:- users can purchase before creating an account
- onboarding comes before authentication
- your app does not require login for checkout
Explicit app user IDs
Use a stableappUserId when your product has accounts. It improves access continuity across reinstall, support, and multi-device recovery.
Identity transitions
UselogIn(...) when an anonymous user becomes known later. Use logOut() when leaving an identified customer and returning to an anonymous local runtime.
reset() is stronger than logout and should be kept for deliberate local wipes, testing, or wrapper restarts.