javascript - Firebase UID 是否始终为 28 个字符?

标签 javascript firebase firebase-realtime-database firebase-authentication firebase-security

我正在为我的 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/

相关文章:

javascript - 没有使用 wp_query 插件的 WordPress REST API

javascript - 设置状态 : can only update a mounted or mounting component react native/undefined is not an object

javascript - 如何在 firebase 中获取对象的先前值(值)?

java - 我似乎不能从 firebase 数据库中引用用户 ID 下的 child

python - 无法通过pyrebase从firebase下载文件

javascript - 将日期从一个函数传递到下一个函数

javascript - 滚动时保持图像在顶部

firebase - 无法将事务集与 SetOptions 合并

ios - 值没有出现在我的其余代码中

javascript - 如何使用 type=module 脚本中的代码