1
votes

According to the official docs, once the user has been created, the UID is the phone number itself.

https://firebase.google.com/docs/auth/ios/phone-auth#sign-in-the-user-with-the-verification-code

This doesn't seem very secure, as we often use the user.uid in many other fields across the app.

1

1 Answers

0
votes

Actually the user.uid will be provisioned by the Firebase Auth backend to be some long random alpha numeric string. However the providerData entry for the phone auth provider will have the phone number as uid: user.providerData[phoneProviderIndex].uid === the normalized phone number.