I want document-ids of user database to be their phoneNumber+userName. For that purpose I want to set custom UID for the user when he first logs in.
Asked
Active
Viewed 80 times
1 Answers
0
There is no way to control the UIDs generated by Firebase's built-in providers. If you want to control the UID, you will have to create your own provider. I'd recommend against using any part of the credentials as the UID though, as you want a UID to be stable and not have to change it when someone gets (for example) a new phone number, or wants to be known by a different user name.
This has been covered a few times before, so I recommend also checking out:
Frank van Puffelen
- 565,676
- 79
- 828
- 807