'Is it safe to use a Firestore auto-generated ID in place of the Firebase user auto-generated ID?

The Firebase Authentication auto-generated ID is considerably longer than the Firestore [document] auto-generated ID.

y0b4UcWzyjOvstEdV4aLz6W23oh2 // Firebase Auth
rXGOCJpkccD1WzFdXyA2         // Firestore

I ask because I want to create the user's documents before I create the user itself and so I rely on the Firestore ID for the user's ID and plug that into the create-user function in Auth, which works fine. My question is, is this a good practice? And why is the Auth ID so much longer? Shouldn't document ID's have a bigger key space since documents almost always outnumber users?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source