在Firebase Realtime DB中,有哪些限制:
?
对长度以及不允许/特殊字符/值的含义限制.并且可能存在任何其他限制(或劝阻).
是这个弃用前谷歌整合文件(点击这里)仍然是最新的?
密钥长度:768字节
子节点深度:32
我没有看到那里提到的最大路径长度.
此文档的非弃用位置是什么?
我在https://firebase.google.com/docs/中找不到相应的商品.好像有些文档"在洗牌中丢失了"......
谢谢你的任何提示.
编辑:我稍微扩大了它 - 不仅仅是长度,而是任何可能适用的限制.
我正在使用 firebase 开发我的第一个应用程序。我在登录时遇到了一些问题。
基本上,到目前为止我所得到的:
我的问题
当用户第一次使用该应用程序时,他们还没有一个帐户,如果他们没有互联网连接,他们将无法创建一个(至少我是这么认为的)。
我的问题
处理这个问题的最佳方法是什么?是否有可能在没有互联网连接的情况下获得唯一密钥?我应该要求用户创建互联网连接吗?其他可能性?
我正在尝试使用新的FirebaseUI进行身份验证.我在LogCat中收到以下错误
07-01 22:33:17.170 715-789/com.gmail.rixx.justin.cashcaddy I/OpenGLRenderer: Initialized EGL, version 1.4
07-01 22:33:17.234 715-715/com.gmail.rixx.justin.cashcaddy I/art: Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.auth.api.credentials.internal.zzf>
07-01 22:33:17.235 715-715/com.gmail.rixx.justin.cashcaddy I/art: Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.auth.api.credentials.internal.zzf>
07-01 22:33:17.242 715-715/com.gmail.rixx.justin.cashcaddy I/art: Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.auth.api.credentials.internal.zze$3>
07-01 22:33:17.242 715-715/com.gmail.rixx.justin.cashcaddy I/art: Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.auth.api.credentials.internal.zze$3>
07-01 22:33:17.243 715-715/com.gmail.rixx.justin.cashcaddy I/art: Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.auth.api.credentials.internal.zzf>
07-01 22:33:17.243 715-715/com.gmail.rixx.justin.cashcaddy I/art: Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.auth.api.credentials.internal.zze$4>
07-01 22:33:17.243 715-715/com.gmail.rixx.justin.cashcaddy I/art: Rejecting re-init on previously-failed class …Run Code Online (Sandbox Code Playgroud) 我正在尝试更改我的firebase实时数据库规则,以便我可以从经过身份验证和未经身份验证的用户访问它,我将其更改为
{
"rules": {
".read": "auth == null",
".write": "auth != null" ||"auth==null"
}
}
Run Code Online (Sandbox Code Playgroud)
但是或者运营商||没有工作.我该怎么办?
谢谢!
android firebase firebase-authentication firebase-realtime-database
我正在尝试使用页面加载时生成的快照从Firebase数据库中获取一系列项目.我已经将每个对象的值添加到数组中,现在我正在尝试将每个对象的项目推送到另一个带有for循环的数组中.
但是当我创建第二个数组时,它中的项目比快照中的对象多.
我想知道如何解决这个问题.任何帮助都是极好的.谢谢.
码:
var ref = firebase.database().ref().child('/scenes/' + projId).orderByChild('wordcount');
ref.once('value',function(snap) {
snap.forEach(function(item) {
var itemVal = item.val();
keys.push(itemVal);
for (i=0; i < keys.length; i++) {
counts.push(keys[i].wordcount);
}
});
});
Run Code Online (Sandbox Code Playgroud) 我真的在为 firebase 数据库安全规则而苦苦挣扎。
我正在开发一个简单的应用程序,用户可以在其中维护记录列表,任何人都可以读取该列表,但只有创建记录的用户才能编辑或删除。
只需将其视为待办事项应用程序,经过身份验证的用户可以管理任务列表。用户可以互相阅读任务列表,但只有创建任务的用户才能删除或编辑它。
我尝试了不同的选择,但未能提出正确的安全策略。
是否有我可以遵循的示例或有关如何构建数据以简化安全策略的任何建议?
示例安全规则
我试过这样的事情 -
"rules": {
"records" : {
".read" : true,
"$user_id": {
".write": "auth.uid === $user_id"
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
这样任何人都可以读取记录,但只有具有匹配 user_id 的登录用户才能添加、编辑或删除记录。
但是,当我在模拟器中尝试写入操作时,总是收到写入拒绝错误。我在请求正文/数据中将 auth uid 作为“user_id”传递。
我也试过
{
"rules": {
"records" : {
".read" : true,
".write": "auth.uid === data.child('user_id').val()"
}
}
}
Run Code Online (Sandbox Code Playgroud) 我在php中创建一个小应用程序,我使用firebase作为后端服务器来管理,验证用户.我有一个包含两个以上字段的注册表单,电子邮件和密码(姓名,电话号码,位置等),但在firebase文档(下面的代码)中,我们只能通过电子邮件和密码注册用户.那么,我的问题是如何保存用户的其他信息以及以后如何检索该信息?
firebase.auth().createUserWithEmailAndPassword(email, password).catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
// ...
});
Run Code Online (Sandbox Code Playgroud) javascript firebase firebase-authentication firebase-realtime-database
我正在尝试将新的firebase数据库安装到我的应用程序中,但是由于下一个错误而失败:
错误:找不到com.google.firebase:firebase-database:9.2.0.要求:appName:app:unspecified
比我克隆官方谷歌示例frome 在这里,并试图建立数据库示例,但我仍然得到相同的错误...
看起来这是因为一些谷歌错误.我对吗?在其他情况下,为什么会发生以及如何解决这个问题?
我正在编写一个应用程序来测试firebase,用户可以在其中列出带有图像的产品.我有上传的问题,因为虽然图片存储,但它们没有链接到产品(图像数组没有被传递?)和LeakCanary发出了一个内存错误信号.所有帮助和输入赞赏.
这是我的产品型号
@IgnoreExtraProperties
public class Product {
public String uid;
public String seller;
public String name;
public String description;
public String city;
public double price = 0.0;
public List<Uri> images = new ArrayList<>();
public Product () {
}
public Product(String uid, String seller, String name, String description, String city, double price, List<Uri> images) {
this.uid = uid;
this.seller = seller;
this.name = name;
this.description = description;
this.city = city;
this.price = price;
this.images = images;
}
// [START post_to_map]
@Exclude …Run Code Online (Sandbox Code Playgroud) android firebase firebase-realtime-database firebase-storage
我的Web应用程序中有一个简单的表单,它将JSON对象持久保存到Firebase数据库.并非此表单上的每个字段都是必需的,因此在构造发送的对象时,它可能具有多个undefined属性.
由于Firebase在尝试持久化undefined值时会抛出错误(更不用说,你不应该undefined在JSON对象上有一个值),我想知道框架是否提供了任何方法来覆盖所有未定义的值,null甚至是空字符串; 我还没有在网上找到解决方案.
最糟糕的情况我可以null手动设置所有未定义的属性,但我宁愿不这样做
对此有何想法或建议?
非常感谢!