Link Apple Health Data to firebase user

I'm building a basic SwiftUI app which reads user steps data from HealthKit and stores the steps count to linked firebase Firestore database. My app use Firebase email/password authentication. I want to somehow read user's Apple ID linked with the health store and I want to store it in my firebase database. This is to ensure if user logs in from another device, data from other health store linked to another device don't mix with user's own data already stored in firebase. So logically I need to keep track of users Apple ID to match that on new device with the one user provided initially. Thanks