I saw some older question regarding this topic, but I wanted to check if during the years something changed.
I am building a friend system in Swift. There I have a list if users, that confirmed the friendrequest.
In the userData for each registered user, I have a field 'friends', that shows the confirmed friends with a Bool-value:
UserData:
- friends:
- UID1 : true
- UID2 : true
[...]
In my list, I want to show now the email of the friends, not the UID. Is there a way to get the the email by something like Auth.auth().getMailByUid()? Right now it feels very fiddly, to get the whole userData-Collection of each friend and extract the email from there. It also feels like a duplicate to save the mailadress separately in the userData, because it is already linked with the UID in the Authentication system of Firebase.
What would be the common way to achieve that?