Reputation: 7169
I am using Firebase to generate a unique key using .push().key
Each instance I have seen is exactly 20 characters. Are they always 20 characters? As I plan on adding string length to my firebase rules.
Thanks
Upvotes: 2
Views: 2274
Reputation: 973
When using push(), the generated keys have a fixed length of 20 characters. See this blog post for more information regarding the generation of the keys.
https://firebase.googleblog.com/2015/02/the-2120-ways-to-ensure-unique_68.html
Upvotes: 6