我想使用Firebase来制作公开可读的数据,这些数据的位置很难猜测。因此,为了让某人访问存储在"element element ID =X“中的数据,我只想向他们发送"X",而不是向他们发送"X”以及为使他们访问该元素而精心设计的安全令牌。Firebase的push()和childByAutoID看起来很适合:我可以授予所有单独元素的公共读取访问权限,但拒绝公开列表。我的代码将是幸运的,没有令牌和随机数的产生。自动生成的ID应该是唯一的,因此很难猜测。
从来看,自动生成ID的前8个字符是基于当前时间戳的,接下来的12个字符是使用Math.random()随机生
我正在尝试将一些东西推到firebase rtdb,我希望能够很容易地在其他地方访问它。这就是我要添加到rtdb的内容:
function addStudentHandler(studentData) {
fetch(
"url that I put in real code",
{
method: "POST",
body: JSON.stringify(studentData),
headers: {
我在react原生应用中使用它来保存firebase中的购买历史记录,只有0,1,2,3,4……密钥不是系统生成的唯一密钥
我使用下面的语法
firebase2.database().ref('user_data/' + my_key+"/purchase_history").push(MY_DATA)
我想删除purchase_history and 0之间的键,当我添加新数据时,它应该像0 then 1 then 2 then 3 and so on......一样可见
我用firebase/firestore构建了react本机应用程序,并得到了错误信息。
Error: Argument "documentPath" must point to a document.
当我写这行
var userStatusFirestoreRef = firebase.firestore().doc('/status/' + uid);
全码
firebase.auth().signInAnonymouslyAndRetrieveData().then((user) => {
var uid = firebas