Firebase身份验证触发器的云函数
我正在使用提供商Google和Facebook使用firebase身份验证进行身份验证。现在我想为firebase使用云函数。我想使用函数中的身份验证触发器将用户信息推送到数据库节点。有人能告诉我如何在身份验证触发器onCreate(event=>…)中使用firebase.ref().push()。您需要使用firebase adminFirebase身份验证触发器的云函数,firebase,firebase-realtime-database,firebase-authentication,google-cloud-functions,Firebase,Firebase Realtime Database,Firebase Authentication,Google Cloud Functions,我正在使用提供商Google和Facebook使用firebase身份验证进行身份验证。现在我想为firebase使用云函数。我想使用函数中的身份验证触发器将用户信息推送到数据库节点。有人能告诉我如何在身份验证触发器onCreate(event=>…)中使用firebase.ref().push()。您需要使用firebase admin const functions=require('firebase-functions'); const admin=require('firebase-ad
const functions=require('firebase-functions');
const admin=require('firebase-admin');
admin.initializeApp(functions.config().firebase);
返回admin.database().ref(“…”).push(
{foo:'someValue'}
);