下面是我如何生成调用API的accessToken的代码。 import firebaseConfig from './../firebaseConfig';
import firebase from "firebase/app";
import "firebase/auth";
firebase.initializeApp(firebaseConfig);
var provider = new firebase.auth.GoogleAuthProvider();
firebase.auth().signInWithPopup(provi
我们正在尝试从Firebase实时数据库中检索数据。
当我们尝试使用PostMan将Firebase中显示的URL添加到我们的项目数据中,并在末尾添加".json“,如下所示...
https://our_project.firebaseio.com/rest/our_data.json
...we收到"user not authenticated“错误。
如果我们尝试使用该URL检索数据,使用web api密钥,如下所示...
https://our_project.firebaseio.com/rest/our_data.json?auth=[our web api k
我试图使用内置的functions.config().firebase对象从云函数访问firebase (我的用例是一个浅查询)。
const { credential } = functions.config().firebase;
credential.getAccessToken().then( ({ access_token }) => {
// use access_token as auth param to query the REST API
});
当我在REST中使用返回的access_token作为auth parameter时,我得到了could not pa
我是Firebase的新手,想通过Rest API交换数据。我想开始为我的数据结构定义我的表,但没有人解释这是如何工作的。对于测试,我使用Postman访问并将数据放到Firebase中,这很好用,但我如何定义成员数据结构?
Members
|- Id 1
|- Name
|- First name
|- Id 2
|- Name
|- First name
|- Id 3
|- Name
|- First name
有没有人有联系?大多数时候,我使用SQL,并且我需要我的表数据在线。
Firebase有一个允许使用自定义auth变量初始化连接的功能。
示例中的链接:
# Fetch the service account key JSON file contents
cred = credentials.Certificate('path/to/serviceAccountKey.json')
# Initialize the app with a custom auth variable, limiting the server's access
firebase_admin.initialize_app(cred, {
'dat
我一直在想如何获得密钥并使用它,但我不能弄清楚。尝试过Object.keys,YT,Get Firebase child nodes' names without getting their children too in Firebase response?,Firebase REST API working with shallow data,使用.getKey获取密钥并将其存储,然后在收到密钥后使用.update等等。我可能想多了,提前谢谢。 firebase
.database()
.ref("Posts")
.push({