Duplicated data source for different users

PlannedBovid2 months ago

How do I know if same account of wearable has been connected to another user as well. For example, one user connects his Apple Health and he logged out and signed up with another account and connected the same Apple Health with the other account. Terra is sending same data for both users, in this case. This should not be the case and it should revoke the access of first user or let us know. The event user_reauth is not for this purpose, I guess.

terra

Vanessaadmin1 day ago

Hey there,

When the same wearable account is connected again under the same dev_id, Terra handles everything automatically: the previous User record is deleted, and a brand-new User with a new user_id is created. This ensures there is always only one active Terra User per wearable account for your dev_id.

The user_reauth event is different. It fires when the same Terra User reconnects their wearable, not when a wearable account gets connected to a different end user in your system.

To track this cleanly on your side, use the reference_id you pass during authentication. When you receive a new successful auth event, check if that wearable account was previously tied to a different reference_id. Terra will already have removed the old User, so all future data will automatically flow to the new user_id.


Cookie Preferences

Essential CookiesAlways On
Advertisement Cookies
Analytics Cookies

Crunch Time: Embrace the Cookie Monster Within!

We use cookies to enhance your browsing experience and analyse our traffic. By clicking “Accept All”, you consent to our use of cookies according to our Cookie Policy. You can change your mind any time by visiting out cookie policy.