firebase-admin

Is there a way to listen for firebase database changes in python?

荒凉一梦 提交于 2019-12-25 01:49:02
问题 I have a python application that listens for put(add) events in my firebase database using Pyrebase but the stream feature of pyrebase is deprecated and stops listening after 30 minutes. The library is not supported anymore. I figured out that firebase has a library for python called firebase-admin, however this does not have a streaming/listener capability for python, only for java. Is there any other way to do this? # get database instance conn_instance = Database() db = conn_instance.get

Firebase revoke token on download url

梦想的初衷 提交于 2019-12-24 13:06:23
问题 When I simple "took" a images on firebase console it create me automatically a download url like https://firebasestorage.googleapis.com/XXX/YYY/XXX/name.jpg?alt=media&token=. I wanna have my file super-secured, how I can remove this download url or revoke this token? 回答1: The Firebase console provides a "revoke" option next to the download URL which can be used for this (look under the "File Location" tab). You should use Firebase rules to properly secure your assets, if object-level security

Using Firebase Admin in a Java desktop application (using Eclipse)

谁都会走 提交于 2019-12-24 08:53:44
问题 I want to use firebase admin in my java application. On the website it says I can add it via gradle or maven. But I don't want to do that. Instead I downloaded the jar file from maven central repository website and added it as a library to my project. I added the code as stated on the firebase guides section and run the application and I get the following output; Exception in thread "main" java.lang.NoClassDefFoundError: org/json/JSONException at error.myclass.main(myclass.java:17) Caused by:

Firebase cloud function firestore array union

依然范特西╮ 提交于 2019-12-24 08:03:04
问题 I'm unable to get the array union or increment to work properly in firebase cloud functions. return docRef.update({ object: { count: admin.firestore.FieldValue.increment(1), list: admin.firestore.FieldValue.arrayUnion({ space_id: newData.date_id, user: { displayName: "john doe" } }) } When the function runs, it simply overwrites the existing data in the list array and the count is always set to 1 even though it currently exists and is of number type. 回答1: Following you comment, here is below

Node.js authentication server for Firebase Admin SDK - JWT validation issue

◇◆丶佛笑我妖孽 提交于 2019-12-24 01:48:09
问题 I am working on a project where we are going to be using different services in a microservice architecture, and we would like to also use some Firebase services. I am working on an auth server that is going to mint custom JWT's for use in both Firebase, as well as the other API projects. We would like to use the Firebase Auth SDK to easily integrate with FB, Google, Twitter etc, but we need to enrich the user's token with more data. Therefore, my thought process is that I'd create a Node.JS

Node.js authentication server for Firebase Admin SDK - JWT validation issue

痴心易碎 提交于 2019-12-24 01:48:01
问题 I am working on a project where we are going to be using different services in a microservice architecture, and we would like to also use some Firebase services. I am working on an auth server that is going to mint custom JWT's for use in both Firebase, as well as the other API projects. We would like to use the Firebase Auth SDK to easily integrate with FB, Google, Twitter etc, but we need to enrich the user's token with more data. Therefore, my thought process is that I'd create a Node.JS

Firebase Admin SDK to download/retrieve files on Google Cloud Storage

穿精又带淫゛_ 提交于 2019-12-23 03:01:42
问题 I'm trying to download some images that I have uploaded to my Google Cloud Storage (aka into buckets). I'm unable to use the .ref() method on any of my const storage or const bucket because they are part of the admin SDK. The admin.storage has only the method .bucket() (https://firebase.google.com/docs/reference/admin/node/admin.storage.Storage). I'm able to access the buckets. bucket.getFiles() works, and the result comes out to be an Array of Files objects with a ton of metadata (like file

How to use Firebase Admin SDK in Flutter?

六眼飞鱼酱① 提交于 2019-12-22 09:20:13
问题 I'm creating a app where I should be able of managing users access. The admin should have permissions of creating, deleting and editing users accounts. I'm using firebase for creating users account. Right now individually users can creating, editing and delete their accounts, but the problem is that the admin should do that, and not just the users. import 'dart:async'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/services.dart'; import 'package:google_sign_in

Disable many users at once

江枫思渺然 提交于 2019-12-22 08:46:10
问题 We are using Firebase Authentication in a multitenant setup. Under certain circumstances, we want to disable all users for one tenant (trial ended, subscription not renewed ...) or enable all previously disabled users. We send an UpdateRequest for every user that has to be enabled/disabled. Although we send the requests sequentially (only one at a time per tenant and not many tenants are disabled at the same time), we have encountered a quota exceeded error several times: { "error": { "errors

Cloud Functions for Firebase database onWrite triggered twice

牧云@^-^@ 提交于 2019-12-22 08:35:13
问题 Hi I am developing a notification system, but I am having trouble deleting the processed notification data. The onWrite event listener is triggered twice resulting to two notifications. Can you help me find a work around so that onWrite event listener should not be triggered twice? It is important to delete the processed data. exports.sendMessageNotification = functions.database.ref('/notification/message/{recipientUid}/{senderUid}').onWrite(event => { /* processing notification and sends FCM