Reputation: 327
My Question: How is Firebase's Auth UID generated?
Current Scenario: I want to give each user (who registers on my website) a good looking unique id. Examples: a 6-digit number, a mix of digits and strings (like korean5684, indian8439) and I don't want any collisions.
So, I'm looking for a way to hash from Firebase's Auth UID to a custom ID with as few collisions as possible. For efficient hashing, I need to know the way the UID is generated.
Thanks in advance...
Upvotes: 0
Views: 669
Reputation: 598765
The algorithm used for Firebase Authentication UIDs is undocumented, has changed over time, and is dependent on the provider(s) used. You should not base your implementation on any assumption/knowledge on how the UID is generated.
Upvotes: 3