我正在为我的 Firebase 项目创建安全规则,并希望将 UIDstring.length == 28
添加到我的数据库规则中。我的所有用户 UID 都是 28 个字符,但我想检查它们是否可以更长或更短?
谢谢
最佳答案
Firebase 开发人员有 this to say在他们的论坛上:
I would not rely on a constant length for the UIDs forever. We chose the current value because it provides a big enough ID space while still being under the 36-character limit for Firebase Analytics user properties.
因此,换句话说,您的建议将来可能会失败,也可能不会失败,因此您可能应该找到一种更面向 future 的不同实现方式。
关于javascript - Firebase UID 是否始终为 28 个字符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56712987/