当函数正在侦听顶级文档时,subcollections中的更改可以触发Firebase函数吗?如果不是,通配符示例中的第一行意味着什么?
这是什么意思?如果子集合发生更改,它会触发函数吗?但它似乎并不是这样,在同一页的其他地方也是这么说的。
// Listen for changes in all documents and all sub-collections
..。
exports.useWildcard = functions.firestore
.document('users/{userId}')
.onWrite((event) => {
/
我已经对我的用户进行了身份验证,我有一个uid。但是当我尝试使用Firebase中建议的代码写入数据库时,
var isNewUser = true;
var ref = new Firebase("https://<YOUR-FIREBASE-APP>.firebaseio.com");
ref.onAuth(function(authData) {
if (authData && isNewUser) {
// save the user's profile into the database so we can list
我正在为我的应用程序的后端部分使用firebase。我的代码是这样的:
<script type="module">
// Import the functions you need from the SDKs you need
import { initializeApp } from "https://www.gstatic.com/firebasejs/9.6.1/firebase-app.js";
// TODO: Add SDKs for Firebase products that you
我试图设置Cloud安全规则,以便只授予与文档ID匹配的用户的文档访问权限。Firebase身份验证用于验证用户并使用特定于用户的ID命名文档。文档存储在“用户”集合中。
以下是我的规则:
service cloud.firestore {
match /databases/{database}/documents {
match /Users/{userId} {
allow read, update, delete: if request.auth.uid == userId;
allow create: if request.auth.uid !=
我是新的反应,我正在构建一个todo应用程序使用react和firebase。成功地连接了Firebase以响应应用程序,但是我得到了以下错误
。它还说FirebaseError:缺少或没有足够的权限。请你解释一下这个问题是什么,我该如何解决。
这是密码
import React, { useState, useEffect } from 'react';
import { Button } from '@material-ui/core';
import db from './firebase';
import Todo from '