firebase

Firebase Cloud Functions - Delete Entries where timestamp field is over a month old and run daily

有些话、适合烂在心里 提交于 2021-02-19 05:38:10
问题 This is a two in one question. Part 1: I am storing data in Firestore, and one of my fields is an 'end_date' timestamp field. How can I write a cloud function, so that when this field is over a month in the past, the record is deleted? Part 2: How can I get this to run every day? 回答1: You can solve this problem, and related problems, relatively easy by combining the following technologies: Nodejs, firebase-admin SDK, and the async/await pattern. This is not a full solution, but just to give

Firebase firestore timestamp based security rules

你离开我真会死。 提交于 2021-02-19 05:33:37
问题 On my client side I am creating a document with one of the fields "createdDate" below is a payload from the firestore simulator { "__name__": "/databases/(default)/documents/billing/aaaa", "data": { "createdDate": 1529237500239, "createdDateTimeFormat": "2018-06-12T07:00:00.000Z" } } I tried to set the security rule to make sure the "createdDate" is not in the future. service cloud.firestore { match /databases/{database}/documents { match /billing/{userId}{ allow create: if (request.resource

Firebase firestore timestamp based security rules

Deadly 提交于 2021-02-19 05:32:18
问题 On my client side I am creating a document with one of the fields "createdDate" below is a payload from the firestore simulator { "__name__": "/databases/(default)/documents/billing/aaaa", "data": { "createdDate": 1529237500239, "createdDateTimeFormat": "2018-06-12T07:00:00.000Z" } } I tried to set the security rule to make sure the "createdDate" is not in the future. service cloud.firestore { match /databases/{database}/documents { match /billing/{userId}{ allow create: if (request.resource

Flutter error on pod install: CocoaPods could not find compatible versions for pod “Firebase/CoreOnly”

六月ゝ 毕业季﹏ 提交于 2021-02-19 05:14:48
问题 My Flutter app is not working on my iOS device, while its working perfectly on android. I'm getting an error on pod install This is the output of pod install --verbose alyzing dependencies Inspecting targets to integrate Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``) Using `ARCHS` setting to build architectures of target `Pods-OneSignalNotificationServiceExtension`: (``) Finding Podfile changes A contacts_service A firebase_auth A flutter_crashlytics A local_auth A

Flutter error on pod install: CocoaPods could not find compatible versions for pod “Firebase/CoreOnly”

北城余情 提交于 2021-02-19 05:14:20
问题 My Flutter app is not working on my iOS device, while its working perfectly on android. I'm getting an error on pod install This is the output of pod install --verbose alyzing dependencies Inspecting targets to integrate Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``) Using `ARCHS` setting to build architectures of target `Pods-OneSignalNotificationServiceExtension`: (``) Finding Podfile changes A contacts_service A firebase_auth A flutter_crashlytics A local_auth A

“firebase serve --only functions” doesn't work

∥☆過路亽.° 提交于 2021-02-19 04:43:30
问题 $ firebase serve --only functions ⚠ Your requested "node" version "8" doesn't match your global version "12" Error: TIMEOUT: Port 5000 was not active within 30000ms but when serve hosting will success $ firebase serve --only hosting i hosting: Serving hosting files from: dist/chongsheng-jp ✔ hosting: Local server: http://localhost:5000 I thought that I didn't compile index.ts, I tried npm run serve following firebase official doc but It doesn't work. Please help me. Here is my versions.

What is the performance cost of an onSnapshot in firestore?

Deadly 提交于 2021-02-19 03:56:27
问题 I am designing an app that contains (a lot of) documents which are shared to (possibly many) groups. I need to understand how document changes are pushed from the server to the client in order to build my data model. Are all changes to the database pushed to the clients (with minimal data) and clients download what has been registered with onSnapshot ? Is there a filter on the remote server that is updated and only relevant data is pushed to the client ? In model (1), the cost of adding many

How to add scopes to Facebook login with Firebase

一笑奈何 提交于 2021-02-19 03:54:59
问题 I am trying to add scope and access more properties of the signed in user from Facebook. However, Firebase 3 sdk seems to not be clear on that. provider = new firebase.auth.FacebookAuthProvider(); provider.addScope('public_profile, email, gender, user_birthday'); firebase.auth().signInWithPopup(provider).then((result) => { var token = result.credential.accessToken; var user = result.user; // doesn't have any extra information }); Has anyone figured out how to access additional scope? 回答1: The

Stop saving in cache memory Flutter web Firebase hosting

江枫思渺然 提交于 2021-02-19 02:47:13
问题 I designed a web app using the Flutter web. I hosted it with Firebase host. But It's not showing changes of my code after deploying to firebase. It's still showing my older version of web app. But I can overcome this problem by clearing cache memory of browser or ctrl+refresh . But I don't want to do this every time I deploy to firebase. How to stop saving my web app in cache memory? hosted link: https://frcovid19dashboard.web.app 回答1: Append a version number to your main.dart file. Every

Firebase is authorised by FedRAMP?

廉价感情. 提交于 2021-02-19 02:31:27
问题 I am using Firebase as back end. I saw google service was authorised by FedRAMP and firebase has been used integrating with google cloud. So firebase is also authorised by FedRAMP? If not, is there any way to be authorised by FedRAMP in firebase? 回答1: @Tahvo., I too am developing on Firebase and Cloud Firestore within the Gov. I talked to our Google Rep and she queried the Federal team within Google. Apparently firebase didn't go through the Fedramp certification but there are plans