firebase-realtime-database

Need help in understanding Firebase config security

五迷三道 提交于 2019-12-25 09:15:38
问题 If one integrates this config in JS, won't it be a security concern as any one can open the JS file, get access to this details and access my firebase DB? var config = { apiKey: "xxxx", authDomain: "xxx.firebaseapp.com", databaseURL: "https://xxx.firebaseio.com", storageBucket: "xxx.appspot.com", messagingSenderId: "0000" }; How does one make sure it's secure? 回答1: That's just so the client can identify your app. Even the apiKey is more like a reference and less like a secret password so don

how to make sure Query is not empty

爷,独闯天下 提交于 2019-12-25 09:14:52
问题 i have an application with many types of users like normalUser,PremiumUser and in order to define that i use their unique UID in firebasedatabase to each one in their category premium or normal this is my database firebase shape --users -----normal -----premium so if user choose normal account he will be assigned to normal only for me this is how to grab his data later when he log in is as follows if (auth.getCurrentUser() != null) { finish(); Query q = FirebaseDatabase.getInstance()

Firebase,Swift: Retrieving only those `autoID` node's which have a specific key

二次信任 提交于 2019-12-25 09:14:47
问题 Question---> Is there a way to retrieve a node whose key is an autoID , which Might contain a particular key. Like in below JSON structure i have a child node powers inside some autoID 's, not all of them , I want to retrieve only those nodes which have key powers in them not knowing what corresponding value might be . In the below two suggested approach which one would consume less BandWidth ? My JSON Tree node1 -node12 -autoId1 expo: "5122223333" users: -MqrvHRBTRcPzrvAOdkklBzeFW7E2

We noticed that your Google Cloud Project has open project firewalls

眉间皱痕 提交于 2019-12-25 09:14:11
问题 I got an email from: saying: (console.cloud.google.com) We noticed that your Google Cloud Project has open project firewalls. This could make your instance vulnerable to compromises since anyone on the internet can access and establish a connection to the instance. The following project has open firewalls: Playchat (ID: playchat-4cc1d) Google Cloud Platform provides the flexibility for you to configure your project to your specific needs. We recommend updating your settings to only allow

Firebase ApplicationDefaultCredentials doesn't work in dev_appserver

荒凉一梦 提交于 2019-12-25 09:05:48
问题 I'm following the instructions on: https://cloud.google.com/solutions/using-firebase-real-time-events-app-engine I'm trying to get my dev_appserver to make credentialed requests to a firebase database. This works after I've deployed, but not locally. I've run gcloud auth application-default login and have set up my credentials as follows: try: from functools import lru_cache except ImportError: from functools32 import lru_cache import json import httplib2 from oauth2client.client import

Defining the User roles in Firebase

守給你的承諾、 提交于 2019-12-25 09:05:33
问题 In my Android app with Firebase as backend , I am planning to have three roles based on Security. User , Editor , Administrator Anyone signing-up using Facebook is granted the User role by default. The User can read anything but has very limited write permissions ( provide reviews ). The Editor can read anything and has more write permissions than the user ( create articles, provide reviews ). The Administrator can create/Delete Editors . The Administrator can upgrade the role of an User to

Query data by value of deep child [duplicate]

家住魔仙堡 提交于 2019-12-25 09:05:26
问题 This question already has answers here : Firebase v3 Query by Grandchild (2 answers) Closed 3 years ago . I have a data structure like this: groups -KOrPKM2QUzuMnMlHfJu name: "Testgroup 1" members 0: 123456789 1: 987654321 -KOrPKM2QUzuMnMFGfXa name: "Testgroup 2" members 0: 123456789 The number of members is not defined. How can I get every group where one of the members is 123456789 ? This question is different from this because in the other one the key of the value to check is actually

querying firebase efficiently

时光总嘲笑我的痴心妄想 提交于 2019-12-25 08:59:43
问题 I want to search my user base from each users name value. From what I've seen online people often return all users then filter them in a table view but that doesn't seem practical nor viable. My thought was to query data and return an exponentially smaller array of values but I am having trouble using the query methods provided. How do I query a specific aspect of my database? How do I structure my code so that it's viable ; not loading in EVERY user, something like 10 max at a time. Any

firebase - get single object from list as snapshot

不羁岁月 提交于 2019-12-25 08:49:58
问题 So I have a list of objects stored in firebase and want to query for just one object using child equal to method but I am getting a map with single key value instead. Code below showing what I want to achieve instead of dealing with hashmaps. final FirebaseDatabase database = FirebaseDatabase.getInstance(); DatabaseReference coutryRef = database.getReference(FireContract.PATH_COUNTRY); Query countryQuery = coutryRef.orderByChild(FireContract.CHILD_NAME) .equalTo(TestUtilities.TEST_COUNTRY

I am trying to perform a search on names within my FirebaseRecyclerAdapter with the below code

浪子不回头ぞ 提交于 2019-12-25 08:47:31
问题 The problem that I am having is I can search based on numbers inside the name but any other text shows nothing. Basically if the name in the child is 1212 NW Drive, I can search on the 1212 part but not the text of the name. Here is my code for building the adapter based on the EditText. mSearchText.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void onTextChanged(CharSequence s, int