Index Generator for user in firebase

Im trying to store a different types of user with unique ids to my firebase since the realtime database in firebase does not have the auto increment function like cloud firestore. I found some resources creating such ids by looking first into the recent index in tinyDB but nothin in firebase. Can anyone suggest any blocks that I can play with?

I would try Clock1.SystemTime, since it would be extremely unlikely that two people would be added as users at the same millisecond.

you suggest that i should just use clocksystem as userID?

this is an example of the db that I expected to have.
image

And this is the blocks I'm currently working on.

Maybe I will try to explore the idea that you suggested. Thanks

Correction, there is an increment server value you can use in realtime database
(using the REST api)

{"increment":{".sv": {"increment": 1 }}}

You would set the value of tag increment when adding a new user, then get this value to use as the userID.

You could also use the timestamp server value

{"timestamp":{".sv":"timestamp"}}
1 Like

Thank you, i will also explore this idea. Can you send and sources or references i can study ?