firebase-realtime-database
全部标签 我有一个JavaScript应用程序在我的桌面Chrome浏览器中运行,它正在读取和写入Firebase。我想了解它使用了多少流量(与任何本地缓存相比),我想我可以在ChromeInspector中查看。我没有看到任何此类流量。我想我需要调整一些Inspector设置,但看起来我已经打开了所有东西,没有过滤任何东西。如何查看此流量?(对于我目前的简单需求,我更愿意在Chrome中这样做,而不必启动WireShark) 最佳答案 Firebase使用网络套接字与客户端通信。在devtool的网络选项卡中,按“WS”(websocket
我正在为一个网络应用程序登录,我已经做到了,所以用户可以使用他们的电子邮件和密码手动登录,或者使用谷歌登录。有没有办法确定他们使用的方法?最好使用Firebase身份验证状态更改功能。`firebase.auth().onAuthStateChanged(firebaseUser=>{....`我知道您可以在进入Firebase控制台日志时知道他们是如何登录的,但是有没有办法使用JavaScript代码来确定它?当使用firebase.auth().currentUser.providerData时: 最佳答案 @mjrdnk的回答
所以我有一个调用2个异步函数的Firebase云函数。exports.someFunction=functions.firestore.document('some/path').onCreate(event=>{asyncFunction1();asyncFunction2();});asyncFunction1和asyncFunction2都返回一个promise。现在,Firebasedictates我们应该Resolvefunctionsthatperformasynchronousprocessing(alsoknownas"backgroundfunctions")byre
我正在尝试对事务使用异步/等待。但是出现错误“参数“updateFunction”不是有效函数。”vardocRef=admin.firestore().collection("docs").doc(docId);lettransaction=admin.firestore().runTransaction();letdoc=awaittransaction.get(docRef);if(!doc.exists){throw("docnotfound");}varnewLikes=doc.data().likes+1;awaittransaction.update(docRef,{li
我对Jest单元测试很陌生,所以像模拟模块这样的东西令人困惑。在reactnative中,有一个组件使用firebase数据库从给定的ref返回数据://whenthedataofthecurrentuserisavailableuserRef.child(user.uid).on('value',snap=>{//checkofval()consistsdataif(snap.val()){letauthUser=snap.val(),isPatient=authUser.type==="Patient",//Weupdatethestateobjectsothatthecompon
问题如何将async辅助方法添加到CloudFunctionsindex.js文件中?在将fs.writefile转换为Promise时,需要一个async函数才能使用await,如本文所述StackOverflow帖子:fs.writeFileinapromise,asynchronous-synchronousstuff.但是,lint不赞成在exports函数之外向index.js文件添加额外的方法。错误第84行引用辅助函数asyncfunctionwriteFile。Users/adamhurwitz/coinverse/coinverse-cloud-functions/fu
我有一个Controller:$scope.timeAgoCreation=function(order){returnmoment(order.createdAt).fromNow();};在View中:{{timeAgoCreation(order)}}它返回正确的值:9分钟前。但是这个值不是实时更新的。我必须刷新页面。是否可以让它实时更新? 最佳答案 只需将此功能添加到Controller中(不要忘记注入(inject)$timeout服务):functionfireDigestEverySecond(){$timeout(f
让我们采用以下数据结构:现在我想用Firebase函数刷新accessTokenFacebook。我测试了两个选项:onWrite和:onChangedonWrite对我来说看起来最好,但具有以下功能:exports.getFacebookAccessTokenOnchange=functions.database.ref('/users/{uid}/userAccountInfo/lastLogin').onWrite(event=>{constlastLogin=event.data;letdateObject=newDate();letcurrentDate=dateObject
我在我的ReactNativeiOS项目中使用firebasever3.2.1。我阅读了2.4.2版本的日志here,有一个名为changePassword()的方法可以用来更改用户的密码。但是当我查看Firebase版本3.2.1的文档时,我找不到任何名为changePassword()的方法。所以我想知道,changePassword()方法是否不能再在Firebase版本3中使用?谢谢。 最佳答案 自Firebasev3.0以来,changePassword方法不再可用。如果您需要重置用户密码,您可以使用自定义电子邮件操作处理
我正在尝试使用firebase和angularfire进行三向数据绑定(bind)。你可以看到我在Plunker中得到了什么:http://plnkr.co/edit/RGA4jZK3Y6n4RkPCHK37app.js:angular.module('ideaBattle',["firebase"]);服务:angular.module('ideaBattle').constant('FBURL','https://ideabattle.firebaseio.com/').service('Ref',['FBURL',Firebase]).factory('dataBank',fun