FAQ Database Discussion Community


See if number is in Firebase

javascript,jquery,angularjs,firebase,angularfire
So I have a form that registers users, <form class="" ng-submit="vm.passwordRegister()"> <div class="panel panel-default"> <div class="panel-heading"> Register </div> <div class="panel-body"> <div class="form-group"> <input type="text" ng-model="vm.number" class="form-control" placeholder="Client Number" ng-Blur="vm.numberCheck()"/> </div> <div class="form-group"> <input type="text" ng-model="vm.name" class="form-control" placeholder="Your Name" /> </div> <div...

Get contents of child_added while watching firebaseArray

angularjs,firebase,angularfire,watch
I have a simple private chat, but with different type of messages, so when i send to server json structure I pass message type too. $scope.messages = fireChat.firebaseArray; $scope.addMessage = function(e) { //ADD TO FIREBASE $scope.messages.$add({ uid: $scope.authData.uid, text: $scope.msg, timestamp: Firebase.ServerValue.TIMESTAMP, type: 'msg' }); $scope.msg = ""; //RESET MESSAGE...

Search inside objects javascript

javascript,object,firebase
I'm experimenting on login with firebase. I can make an account, and it'll store additional information too. The problem is retrieving this information. I can get it using: usersRef.on("value", function(snapshot) { console.log(snapshot.val()) }, function (errorObject) {...}); When I do this I get two things (because I have two accounts): -JrrzEOqZQU0HVeYVXCm:...

How to loop through $firebaseArray

angularjs,firebase,angularfire
I created an array of users like so - var ref = new Firebase(FIREBASE_URL + '/users'); var users = $firebaseArray(ref); I have added objects to this and I want to loop through each of the users in this array. I know this is possible in the view using ng-repeat, but...

How do you create complex AngularJS data bindings from Firebase?

angularjs,firebase
I working on a basic AngularJS application with a Firebase backend. Part of the database looks like... Student - FirstName - LastName - Schedule -- Course1 -- Course2... I have a page displaying an html table of students with ng-repeat. Here's the code for my table... <table> <thead> <th>First Name</th>...

AngularJs on-click not firing in base template

javascript,angularjs,firebase,angularfire
I am using AngularJs and Firebase, try to get the Angularfire User Authentication working. But had some problem. So I had an on-click event inside nav that will popup the user auth windows. index.html <ul class="nav navbar-nav navbar-right"> <li><a href="#/">Home</a></li> <li ng-hide="authData"><a href="" ng-click="auth.$authWithOAuthPopup('google')">Login</a></li> <li ng-show="authData"><a href="" ng-click="auth.$unauth()">Logout</a></li> </ul> app.js...

What would be a regular expression that can test if a string is a valid Firebase key?

regex,firebase
I'm writing an application that allows users to input values that will be stored in Firebase as a key. Firebase Key Requirement: max size - 768 bytes cannot contain . $ # [ ] / or ASCII control characters 0-31 or 127 allows single spaces, but not double or more...

Read data from Firebase and hide a class

jquery,firebase
I have a Firebase database with users in it with the following data: name: Some Name email: [email protected] tier: standard or premium I'd like to hide the class ".premium-feature" when the the Firebase data for 'tier' reads standard. If the data for 'tier' reads as anything else, I'll need to...

Angular load additional data in ng-repeat

angularjs,firebase
I have an ng-repeat that has a bunch of ids and loops over them. I then want to load the data from an external source. So let's say I have an array [1,2,3,4,5] And I have an ng-repeat that loops over then shows <div>1</div> <div>2</div> ... I want to load...

Cross-platform text, image, video Chat for Android, iOS and Web using Firebase/Parse/PubNub

android,ios,parse.com,firebase,pubnub
I want to develop a cross platform chat application which I can use to send text,url,image,location,video to my friends which can be on android/ios/web. I want chat to be realtime, and want to make sure that even if user is not using application, he get a 'Notification' for new incoming...

Firebase Transaction [Error: Set]

node.js,firebase
I'm using firebase for node, and when attempting to use transaction to create store data, I get: [Error: Set] I'm having a hard time figuring out what this error code is suggesting. I've re-written my code, temporarily disabled security rules, but I get the same error. Here's the code I'm...

Display Length of Array in Firebase

firebase,ionic-framework,ionic,angularfire
Just starting out with Ionic + Firebase and need help. After getting length of array, I want to display its number. Basically trying to get box on screen that constantly shows how many current people are in specific chat room as people move in and out. Got code below from...

How can I securely store and retrieve API Keys for an android application (written in native Java) using Firebase Hosting?

firebase,api-key,firebase-hosting
I'm just starting to learn to code. Providing example code would be fantastic. I developed a simple android application (native Java) using Firebase. I have several API keys hard-coded into the resources of my application. I read that it is better to store these keys on a server. I currently...

$firebaseArray child records don't have IDs on their child nodes

javascript,angularjs,firebase,angularfire
I'm making a modded version of the angular-fire todo list. This modification includes making sublists and sublists of sublists. My problem is that when I add my first level of sublists, the sub-objects don't have the $id that I need to affix a next level of sublist. They don't appear...

FireBase rule newData with uid

firebase,firebase-security
How can i to use unique id of new data in rule with newData? Data structure: I want to disallow to write for the users which one senderName is in ban_users, but i cannot to get the newData senderName: newData('senderName').val(); //not working newData('$message_id/senderName').val(); //also not working("$message_id": {}) ...

How to use Firebase Twitter Authentication with React Native?

twitter,firebase,react-native
How to use Firebase Twitter Authentication with React Native? I tried both of the code below in reference to https://www.firebase.com/docs/web/guide/login/twitter.html var Firebase = require("firebase"); var App = React.createClass({ render: function() { return ( <View> <Text onPress={this._handlePress}> Twitter login </Text> </View> ); }, _handlePress: function () { var myApp = new...

Firebase: when onDisconnect event fire?

android,firebase,firebase-android
I`m using Firebase-backend for my android applicaion. I'd like to build a users presence system for my chat. For this purpose I've taken the pattern from Firebase Guide final Firebase myConnectionsRef = new Firebase("https://<YOUR-FIREBASE-APP>.firebaseio.com/users/joe/connections"); // stores the timestamp of my last disconnect (the last time I was seen online) final...

Joining data between paths based on id using AngularFire

angularjs,firebase
I am currently working on an app using firebase and angularJS (ionic). Basically this is a car management app, so you have people sharing their cars with others. I tried to structure the data as flat as possible to be efficient. My issue here is that if without problem I...

Firebase data structuring - accessing jobIDs for each user

javascript,database,database-design,firebase
In my database, I currently have two kinds of objects, users and jobs. I am already storing userIDs in jobs. Do I also need to store jobIDs in each user? A typical user: "-JqzUjcOfddBNd_HtjKb" : { "contact" : { "-JqzWcIyD77ZwatEKALp" : { "email" : "[email protected]" }, "-JqzWrtyni3ZGOKooNF7" : { "email"...

Authentication error “Access Denied” in AngularFire when using Internet Explorer 9

firebase,firebase-security
I'm using Firebase for simple email/password authentication. Logging in (using the AngularFire client) works fine on both Firefox and Chrome, but on IE9 I get an "Access Denied" error. At this point I have no security rules established, so by default all requests should go through. I've tried loosening the...

firebaseObject $save() replaces the content of reference

firebase,angularfire
I can't make $save() work (i'm using firebaseObject) var user = new Firebase("URL"); user.name = 'mark'; user.$save(); After this my user's all records are simply replaced by a single name: mark ...

firebase security permission not working

firebase,firebase-security,firebase-authentication
I have below data stored in my firebase: firebaseRoot admins simplelogin:1: users simplelogin:1 email: [email protected] picture: csd provider: password uid: simplelogin:1 simplelogin:2 email: [email protected] picture: zsd provider: password uid: simplelogin:1 and following security rules: { "rules": { "admins": { ".read": "root.child('admins').child(auth.uid).val() === true", ".write": "root.child('admins').child(auth.uid).val() === true" }, "users": {...

Firebase REST streaming for multiple users

firebase,server-sent-events,nest-api,firebase-database
I have a server that needs to receive real time updates from Firebase, for multiple users, where each user grants Oauth access to his Firebase data to my app. My server is implemented using Firebase REST Streaming, based on Server Sent Events. I need to know if there is a...

Javascript: Split array of arrays into multiple arrays

javascript,arrays,charts,firebase,flot
serious problem here, I have an array like this: [[0,50],[0,68],[1,26],[2,9],[2,32]] The form I need is to split this array into two separated arrays like this: array1 = [[0,50][1,0][2,9]] array2 = [[0,68][1,26][2,32]] Yeah you are right guys, I need that to build flot chart. If anybody interested in source of data...

AngularFire Google OAuth not retrieving the user's email

javascript,angularjs,firebase,angularfire
I want to get the email address from Google OAuth using AngularFire, but on popup, it's not asking for the email permission. This is the code from Firebase Google auth doc var ref = new Firebase("https://<your-firebase>.firebaseio.com"); ref.authWithOAuthPopup("google", function(error, authData) { /* Your Code */ }, { scope: "email" }); It...

Save to 3 firebase locations with a slow internet connection

javascript,angularjs,firebase,latency
Sometimes I'm having issues with firebase when the user is on a slow mobile connection. When the user saves an entry to firebase I actually have to write to 3 different locations. Sometimes, the first one works, but if the connection is slow the 2nd and 3rd may fail. This...

How to bind button function to a corresponding item in an array - AJAX, Firebase

javascript,arrays,ajax,firebase
I'm attempting to first make an AJAX request from a social API and append the results with a button inside the div that will save the corresponding item in the array to my firebase database. For example, I have my AJAX request - I cut out about 75% of the...

No transports available

sockets,firebase,react-native
I recently was trying to upgrade my react-native app to use react-native 0.5.0 and firebase. According to this article the react-native sockets are working and the full firebase sdk should be available. I was previously using firebase-debug and @badfortrains react-native fork with success following the example project https://github.com/badfortrains/wsExample. Since upgrading...

My Submitpost function isn't working

javascript,jquery,angularjs,firebase
First time using angularJs and I'm following an AngularJS reddit clone tutorial and I don't know where I went wrong. When I click the submit button nothing happens. https://github.com/Eibonic/AngularJS-reddit/tree/master/app This is the nav.js controller 'use strict'; app.controller('NavCtrl', function ($scope, $location, Post, Auth) { $scope.post = {url: 'http://', title: ''}; $scope.submitPost...

How do I Implement a Node.Js server-side event listener for Firebase?

javascript,node.js,windows-8,firebase
I'm trying to listen for data changes in my firebase using firebase's package for Node. I'm using the on() method which is supposed to listen for changes non-stop (as opposed to once() method that only listens to the first occurrence of a specific event ) My listener.js file on the...

Storing HTML in Firebase (AngularFire), good idea or bad?

javascript,html,angularjs,firebase,angularfire
Is it a good idea to store HTML in Firebase (AngularFire)? I have a website where I am creating an admin site where users can make HTML elements. I want people to save these elements and the order and the content within the elements. So I thought it would be...

Firebase push gave me SyntaxError: invalid object initializer

javascript,jquery,ios,safari,firebase
so I am experiencing some very strange problem. I am trying to connect to my firebase and push results to 'surveyAnswers' and it does work in chrome ( ios ) but doesn't work on firefox/safari ( ios ). Here is code which make problem - surveyAnswers.push({answers}); And here is 'complete'...

I'm using AngularFire, How can I retrieve this “email”, “uid” data?

angularjs,object,firebase,angularfire
JS CODE var myFirebaseRef = new Firebase('https://blinding-inferno-7068.firebaseio.com/'); var createdUserRef = myFirebaseRef.child('users').child('createdUser'); $scope.users = $firebaseArray(createdUserRef); HTML CODE <ul ng-repeat="user in users"> <li>{{user.uid}}</li> <li>{{user.email}}</li> <li>{{user}}</li> </ul> What I wanted was user.uid and user.email, but those thing didn't come out. So I checked the user object, and these things came out....

AngularFire pushing to array doesn't work

javascript,arrays,angularjs,firebase,angularfire
I'm developing a contact book application that can have groups with members in them. A member has a name, title, and email but that is not important. I have following controller that has an array of all groups, and an index of which group I'm currently dealing with. Also, there...

Getting an object array length inside an firebaseArray with AngularFire

angularjs,firebase,angularfire
I have an Firebase structure like this: Chatrooms { -efsCsTB95 { Messages { -bdre3G5 { Title: ... } -wer23bd { Title: ... } } } } I have a view like this: <div class="card" ng-repeat="list in chatrooms"> <div class="item item-positive item-text-wrap"> {{list.videoTitle}} </div> <div class="item item-stable"> <div class="card-footer text-right"> <i...

Firebase rules - limit access to owning user

facebook,firebase
My app is using Firebase's Facebook authentication and I have the following users collection: { "fsdjf34hf98wjefj" : { "uid" : "facebook:543634634536" }, "3298djwhy9hwd34234" : { "uid" : "facebook:7658899965432" } } I'm trying to restrict access so that a user can view only his own user: { "rules": { ".write": true,...

Getting a null value in Firebase rest response

rest,null,firebase,restful-url
I am trying to create a restful service using firebase as backend. I have created a sample app and when I hit this url [ https://poctest1.firebaseio.com/rest.json ], I am getting the following response. [ null, { "value": "test1" }, { "value": "test 2" } ] Why am I getting a...

Unable to get a single record as an array from Firebase, but complete list works

angularjs,firebase,angularfire
This Answer did not help which is for something quite similar. I am using angular 1.3.15, with Firebase 2.2.4 and AngularFire 1.1.1. I have a factory to return a reference to the proper Firebase (https://.firebaseio.com angular.module('MyModule') .constant('FIREBASE_URL', 'https://xxxxxxxxx.firebaseio.com/'); angular.module('MyModule') .factory('GetFireBaseObject', function(FIREBASE_URL) { return { BaseURL: function() { return new Firebase(FIREBASE_URL);...

angularFire 3 way data binding won't update an function

javascript,angularjs,data-binding,firebase
I have a firebaseObject (MyFirebaseService.getCurrentUser()) bind to $scope.user. After binding successful, I loop tho the object to see if the object contain "associatedCourseId" equal to some value ($stateParams.id). If does, the $scope.finishLessonCount count up. The problem is, when I add new Object inside the firebaseObject (that bindto user) via other...

handle asynchronous behavior firebase in angularjs

angularjs,firebase,promise
I'm trying put the authentication of my firebase in a service. But I stumbled on some problems with program flow. The response from firebase is slower and the code needs to wait for it to complete. I tried to create a promise, but it doesnt work properly. Here is my...

Android Firebase, simply get one child object's data

android,firebase,firebase-database
I have been looking for a way to get one child object's data in Android Firebase. I have found things like Firebase retrieve child Android. All the solutions are suggesting using a "ChildEventListener", however I need to get this data at this moment, not when it is moved, deleted, updated,...

firebase-import timing out?

json,node.js,firebase
I'm using the firebase-import tool to upload JSON data to my firebase. I consistently get the following error after trying to upload a JSON file that is ~40MB in size. Any ideas why? The output seems to be intentionally cryptic. It always happens when the upload is 42% complete, and...

run jQuery click only after page loads

jquery,click,firebase
I have a page that is pulling content in from firebase and appending it to the page: code: function displaySavedData(Name, Company, Email, Phone, snap) { $('.data').append('<div class="each-container" data-del="'+snap+'"><div class="del">X</div><div class="row-margin"><div class="new-row-one">'+'Name: '+Name+'<br>'+'Company: '+Company+'<br>'+'Email: '+Email+'<br>'+'Phone: '+Phone+'</div></div></div>'); }; There is a div in there, for each div is added to the page...

AngularJS: Uncaught ReferenceError: $rootScope is not defined in run

javascript,angularjs,firebase,angularjs-service,angularfire
I am trying to route all unauthorized traffic to the login page, and am using angularfire to authenticate. Here's all the relevant code. I know most of it is broken, but I'd like to get past this first. The problematic code is: App.js app.run(['$rootScope', '$location', 'AuthenticatorService', function ($rootScope, $location, AuthenticatorService)...

Understanding Firebase's rules for user-write, global-read

firebase,angularfire,firebase-security,firebase-authentication
I am building a simple Firebase application with AngularJS. This app authenticates users through Google. Each user has a list of books. Anyone can see books, even if they are not authenticated. Only the creator of a book can edit it. However, individual users need to be able to record...

Unlink listener for parent does it applied to children in Firebase

javascript,firebase
I am using firebase to synch data in a real time app. After some treatment, I want to unlink all listeners added. So I put myRef.off(); But I discover that some listeners are still attached. My question is: when you put listeners to off for a parent node does it...

Basic understanding of Firebase security

javascript,firebase,firebase-security
Fundamentally, if my client side javascript is going to be modifying my Firebase data remotely, couldn't anyone come along and examine that code and start modifying the same Firebase data at will? I know they can't modify areas of the data that are off limits to various users or situations,...

snap.ref.remove() is removing all the nodes in the parent rather than just itself

firebase
I was just trying to remove the top 2 nodes, but it removes the entire branch instead. If I comment out the remove(), it correctly console.logs the top 2 nodes, but when i uncomment the remove() it deletes all the nodes in that messagesRef, not just the top 2. messagesRef.limitToFirst(2).on('child_added',...

Rendering TeX from something out of a database?

javascript,html,firebase,mathjax
I'm using Firebase to put stuff onto a website. Something like "get a multiple choice question/options and shove them into div tags". Some of these questions use math/chemistry equations, and I think TeX would be a great tool to render. Basically if my question is "Which reaction is exothermic?", I...

Firebase data structure with cyclic dependency

android,database-design,structure,firebase
I'm currently discovering Firebase and trying to evaluate it for further projects. At the moment, i'm testing with a very simple "Todo list" app where lists can be shared with friends. I've read the Doc about flattening data structure to avoid complexity and I came up with the following structure:...

AngularJS share function/common code in a controller

javascript,angularjs,firebase
I have a subroutine I want to use in my controller. In the case or working with data, a new record blanks fields, as would a screen clear, and after some other processes, I would like to clear the editable fields on the view. Controller: angular.module('MyApp').controller('Ctrl', ["$scope", "ServiceData", function ($scope,...

Getting a certain row in Firebase

javascript,firebase
This is the code I got of the Firebase documentation. It returns everything inside the table, so in this case Object { first: "Fred", last: "Flintstone"} But I only need it to return the value of first, which is "Fred". var dbFirebase = new Firebase("firebaselink") dbFirebase.once('value', function(nameSnapshot) { var val...

Can't log in/out or register, and my submitPost function stopped working

angularjs,firebase
Grunt gives me no errors and under the debugger "Error: [$injector:unpr] Unknown provider: AuthProvider <- Auth <- user <- NavCtrl and "Error: [$injector:unpr] Unknown provider: AuthProvider <- Auth <- user This is the auth service https://github.com/Eibonic/AngularJS-reddit/blob/master/app/scripts/services/Auth.js and this is the nav controller 'use strict'; app.controller('NavCtrl', function ($scope, $location, Post, Auth){...

Firebase Qeue and Stripe Subscriptions

firebase,stripe-payments
I have read the other tutorials on how to integrate Stripe with Firebase, all of them require an external server. Recently I found Firebase Qeue and wondered if there would be any way to integrate Firebase Qeue with a Stripe Subscription so that I wouldn't need to use an external...

Storing dictionaries into Firebase?

ios,swift,firebase,nsdictionary
I have a Firebase instance where I want to store a dictionary of values I want to store into firebase. I have looked on the documentation https://www.firebase.com/docs/ios/guide/saving-data.html as a reference but can't seem to get it to work. The following is my attempt: //Declared above are the currentUser values as...

How to see if given object matches one of the objects returned from firebase

javascript,object,firebase
I am trying to test if the given object matches the stored objects that are stored and returned from firebase. If it does then return true or store true in a variable. Here is the example of given object and firebase returned data given object: {name: "John", age: "32"} stored...

Firebase Authentication Limits

java,firebase,firebase-security,firebasesimplelogin,firebase-authentication
I am new to Firebase so any insights appreciated. I'm writing Java server side test code. I grab several users from an database and am trying to migrate the data into user authenticated nodes within Firebase. My code selects a few users from the DB and spins up a new...

Cache without 'on' subscription

javascript,firebase
Is it possible to tell firebase to cache a path without having a 'on' subscription? Currently I'm doing the following which is both inefficient, space waste and ugly: const ref = new Firebase(someUrl) app.get('slow/:id', (req, res) => { ref.child(id).on('value', snapshot => res.send(snapshot.val())) }) const cache = {} ref.on('child_added', snapshot =>...

Get only new “child added” after page load

javascript,firebase
I have on a website facebook style notification in top right corner. I show there up to 5 latest notifications. I do initial pulling with child_added and also after same firebaseRef child_added listening for new notifications. Now I'd like to play a sound on new notification and a little number...

How to write denormalized data in Firebase

javascript,database,web,firebase
I've read the Firebase docs on Stucturing Data. Data storage is cheap, but the user's time is not. We should optimize for get operations, and write in multiple places. So then I might store a list node and a list-index node, with some duplicated data between the two, at very...

Where to put Firebase.setAndroidContext() function

android,firebase,firebase-android
I'm trying to play a bit with Firebase and Android. I have one RegisterActivity, and one MainActivity. My current flow is - start with MainActivity - check if user is registered, if not, call RegisterActivity - after registeration call MainActivity. I'm having trouble with where to put the Firebase.setAndroidContext() call....

Have a trouble with using $bindTo twice

javascript,angularjs,firebase,ionic-framework,angularfire
I'm new to AngularJs and now I'm trying to work with Firebase. This is my Firebase data looks like: pavlovdog | ---facebook: "facebook.pavlovdog.com" | ---twitter: "@pavlovdoggy" And my JavaScript code: angular.module('starter.controllers', ['firebase']) .controller('DashCtrl', ['$scope','$firebaseObject','$firebaseArray', function($scope,$firebaseObject,$firebaseArray) { // Syncing to firebase var ref = new Firebase("https://#####.firebaseio.com/pavlovdog/"); var syncObject = $firebaseArray(ref); syncObject.$bindTo($scope,...

orderByChild(), limitTo() not working in my angularjs project.?

angularjs,node.js,firebase,angularfire
I wanted to implement "Querying Data with firebase" whose documentation was given at fallowing link: "https://www.firebase.com/docs/web/guide/retrieving-data.html". I started implementing the code as following: getDetail : function() { var ref = new Firebase("https://dinosaur-facts.firebaseio.com/dinosaurs"); ref.orderByChild("height").on("child_added", function(snapshot) { console.log(snapshot.key() + " was " + snapshot.val().height + " meters tall"); }) }, But, I...

FirebaseAuth Memory Leak in Activity

android,memory-leaks,firebase,firebase-android,leakcanary
I added the awesome LeakCanary library in my app and pretty soon I started to receive various reports for a leak generated by the FirebaseAuth Object that I use in the various activities. Now my question is: is it a leak generated by the Firebase library itself or I should...

How do I implement firebase using React native?

firebase,react-native
When I try to use npm install to use firebase with React native, I am getting errors. Then when I try to use require for the firebase module, it says that the document can't be found. Is there a way to utilize the firebase API with React native instead?...

How to detect a client that stops listening in firebase?

firebase,firebase-android
Let's say I have 3 clients that are listening for changes on some firebase root. Each client represents themselves as a user in a List (or Map) on the root. I want to remove a user that loses their connection or closes their client app (i.e. stops listening). How can...

Listen for changes on data in Firebase (AngularFire)

javascript,angularjs,firebase,angularfire
Is it possible to listen for Firebase server updates on the DOM in AngularFire? I want to be able to fetch any updates when they are returned from the server to update the values of an array. Basically my problem is that I am using Firebase.ServerValues.TIMESTAMP which is set by...

Getting Websocket Failure when trying to anonymously authenticate user using AngularFire

angularjs,firebase,angularfire
I am trying to anonymously authenticate users using AngularFire. I want to authenticate a user only once (so, if the user has already been authenticated, a new uid won't be generated). When I use the code below, I get a previous_websocket_failure notification. I also get an error in the console...

Firebase - Object vs Array and Returning a .key()

javascript,arrays,object,firebase,angularfire
I'm using firebase + angularfire for a project that involves multiple users editing data at the same time (which would make an object ideal) as well as the need to quickly sort and filter the data on the fly (ideal for an array). So, would it be better for me...

AngularJS - Firebase - Promise Error

javascript,angularjs,firebase
I am trying to follow a basic tutorial on thinkster.io and am tunning into issues. https://thinkster.io/learn-to-build-realtime-webapps/ The tutorial uses an depreciated SimpleLogin, so I have changed the code accordingly however I keep getting an error as follows. TypeError: Cannot read property 'finally' of undefined at Scope.$scope.register (http://localhost:9000/scripts/controllers/auth.js:9:31) I believe the...

Upload single file to firebase hosting via CLI or other without deleting existing ones?

firebase,firebase-hosting
Question: How to upload a single file to firebase without deleting existing files? Details: Intent: upload single file without deleting existing files on server Usage: have separate directories on local machine each uploading to a specific folder on server What I've tried: overriding the public dir with firebase deploy -p...

In firebase, how do you secure a specific key whilst allowing access to others

firebase,firebase-security
Having issues getting my head round firebase security yet again. Say I have the following json data structure in firebase { "users" : { "userguid001" : { "name" : "Test User 1", "email" : "[email protected]", "emailverified" : "true", "otherinfo1": "some text", "otherinfo2": "some more text", "otherinfo3": "and some more text"...

How should I structure Firebase auth password reset flow?

javascript,angularjs,firebase,ionic-framework
I'm using the Firebase authentication solution for registering/logging-in users in my Ionic app. I'm struggling on how to best implement my 'password reset flow'. Currently, when a user forgets their password the flow starts as below: html: <p class="forgot-text" ng-click="login.resetPassword()" ng-show="login.email">Forgot password?</p> controller: vm.resetPassword = function() { authService.resetPassword(vm.email); }; authService:...

Polymer Firebase: Print async data

firebase,polymer
Trying out polymer 0.8 with firebase. I am not able to print data that is being bound asynchronously <dom-module id="card-user"> <template> <div>{{name}}</div> </template> </dom-module> The script tag looks like this Polymer({ is: 'card-user', properties: { name: { type: String, computed: 'getFirebaseName(id)' } }, getFirebaseName: function(id) { var ref = new...

Firebase Java API removeValue not working

java,firebase
I'm relative new to Firebase so appreciate any insight on this one. When I call the Firebase setValue(obj, callback) function in this manner it works perfectly. However, when I tried to remove the value referenced by "ref" nothing happens. This is just a test account so I have my security...

React Native and Firebase

firebase,reactjs,react-native
I just started to play around with Firebase and React Native, and I noticed 2 major problems: React Native seems to break debugging in Chrome I get a Network error when tyring to use the createUser call. Otherwise the integration seems to be awesome! ...

Why is this NSString null in a FireBase query block?

ios,objective-c,firebase,objective-c-blocks,nsmutabledictionary
I can't figure out why this string is null inside the FQuery block. My app keeps crashing when I build the dailyLog MutableDictionary at the user key; NSDateFormatter *df = [[NSDateFormatter alloc] init]; [df setDateFormat:@"MMMM dd, YYYY"]; NSString *userID = [[self.userProfile objectForKey:@"userID"] copy]; self.logFirebase = [[Firebase alloc] initWithUrl:@"https://urlName.firebaseio.com/DailyLog"]; [[[self.logFirebase queryOrderedByPriority]...

How to disable firebase 3-way data binding

angularjs,firebase,angularfire
I am using angularJS 1.3 with angularfire and firebase. I did create some factories that encapsulate the firebase object, and it works very well. The 3 way data binding is really cool. I am planning to build a large application using firebase for data persistance, but I am facing a...

How do I give read/write access to all nodes with Firebase rules?

firebase,rules
Default setting gives full access: { "rules": { ".read": true, ".write": true } } For the sake of testing my understanding of rule-writing from the Firebase guide and documentation, I'm (now retreating to) trying to achieve the same results by writing rules for the 4 parent nodes. If it makes...

My data is being written to Firebase database but i can't read it why?

json,database,osx,swift,firebase
I'm new to swift and databases. All I'm trying to do is read from my firebase database. I'm using the example code provided here: https://www.firebase.com/docs/ios/guide/retrieving-data.html. I'm calling this from my viewcontroller.swift file in override func viewDidLoad(){} func getRootRef(){ // Read data and react to changes println("entered getRootRef") myRootRef.observeEventType(.Value, withBlock: {...

Saving an html object to firebase

javascript,canvas,ember.js,firebase,emberfire
I'm working in ember.js my project has an image cropping mechanic. This returns to me by default a canvas object and some data necessary to redraw the cropped image. But when I try to save the canvas object to firebase it saves it as something like [htmlObject Canvas] or something...

Add fields to angularfire programatically and sync with Firebase

javascript,angularjs,firebase,angularfire,firebase-database
Using AngularJS, AngularFire and Firebase, as a new user, I am having trouble with a distributed code base. I am trying to use Factory() often to re-use code and follow best practices for tests. However, I am having trouble adding data to my AngularFire object, and Firebase. Given the following...

compile error on FirebaseHandle

ios,swift,firebase
I got compile error when I tried to keep a reference to the handled returned by observeEventType call as suggested in the firebase iOS doc firebaseHandle = messagesRef.observeEventType(FEventType.ChildAdded, withBlock: { (snapshot) in error is: Cannot assign a value of type 'UInt' to a value of type 'FirebaseHandle!' this is the...

Update Value of Firebase Children

regex,firebase,angularfire
I'm trying to update the "name" on all children of my services item in Firebase, to remove all leading and trailing spaces. I'm using a regex to carry this out, but I can't seem to work out why it isn't working. I'm looping through my services item using .forEach on...

Firebase: combine filtering with ordering in swift

swift,filter,order,firebase
So I have a sports app, which handle matches and championships data. I have two displays using the same data: All future matches All future matches from a certain championship The data is structured like this - championships - libertadores - name: Libertadores da América - matches - 2j6g42kjhg62 -...

Firebase REST API POST request fails with error: “Invalid data; couldn't parse JSON object, array, or value…”

jquery,ajax,firebase
I'm trying to use Firebase REST API to save stuff into my data store. I tried with jQuery and vanilla JS XHR. However, both give the same error. 403 Bad Request and this response: Invalid data; couldn't parse JSON object, array, or value. Perhaps you're using invalid characters in your...

Understanding Firebase orderByChild

firebase
Here's an example. (Note: The data in firebase is NOT changing. This is to eliminate one variable. In other words, I loaded the data and now it is static.) I'm testing if I'm receiving the correct results from the orderByChild call. I do this in the curl commands below. Please...

Angularfire facebook user_friends

angularjs,facebook,firebase,angularfire
Using facebook authentication with angularFire, I don't see "user_friends" in the Auth object that is returned. ng-click="auth.$authWithOAuthPopup('facebook',{scope:'user_friends'})" This works fine for grabbing the uid, and I see the facebook object which contains the "accessToken", "cachedUserProfile" etc., but no "user_friends". Someone is have a similar issue here with the "email" object:...

Using Ionic - Cannot get Firebase to load properly - Error: Module 'firebase' is not available

javascript,angularjs,firebase,ionic,angularfire
I have looked at the following questions and have not been able to find an effective solution, hence I am posting another question. Ionic + firebase, error Module 'firebase' is not available Firebase, AngularFire Error: Module firebase is not available Angularfire 'Firebase' is not defined I am very much a...

Using Chrome Console with Firebase

javascript,console,firebase
As a js newbie, this is probably a dumb question. But how can I actually use js within a Chrome console. I am trying to interact with my Firebase via the console but when I try to get the Firebase reference I keep getting undefined. I know I can use...

Polymer+Firebase Element - Show spinner while updating data

firebase,spinner,polymer
I'm trying to learn Polymer, but I have some questions and can't find the solutions anywhere. I want to put a loading spinner in my app, while the data is being retrieved from firebase (using firebase-element) to fill the screen info. How can I detect that all data/elements are already...

Unable to get my data from $firebaseObject using AngularFire in a controller. View/ng-repeat works fine

angularjs,firebase,angularfire
I have different sections in Firebase with normalized data, and I have routines to get the information, but I cannot loop through the returned records to get data. I want to use the keys in the $firebaseArray() to get data from other $firebaseObject(). GetOneTeam() .... { var DataRef = GetFireBaseObject.DataURL(Node...

Using $loaded with $firebaseObject to update value VS firebase SDK update. Pros and Cons

angularjs,firebase,angularfire
Let's say I have a service deal with Firebase operation: angular.module('myApp').factory('taskOfferService', ['FURL', '$firebaseArray', '$firebaseObject', '$q', 'taskService', taskOfferService]); function taskOfferService(FURL, $firebaseArray, $firebaseObject, $q, taskService) { var ref = new Firebase(FURL); var Offer = { acceptOffer: function(taskId, offerId, runnerId) { var offerRef = ref.child('taskOffers').child(taskId).child(offerId); var taskUpdate = $q.defer(); offerRef.update({accepted: true}, function(error) {...

Is it necessary to call .off() if firebaseRef set to new value?

javascript,firebase,firebase-database
If I do: var firebaseRef = new Firebase(url); firebaseRef.on("value", function(dataSnapshot) { ... }); And then I reset firebaseRef like: firebaseRef = new Firebase(newUrl); Will the previous .on(...) listener be automatically removed or should I call .off() before setting firebaseRef to a new Firebase(newUrl)...

How to Convert Firebase data to Java Object…?

java,android,firebase
Using Firebase Library to send data to the server in the form Message(String,String) added to the HashMap Example: Firebase fb=new Firebase(URL); Firebase msgRef = fb.child("finished"); HashMap<String, Message> msgList = new HashMap<>(); Message msg = new Message(m, n); msgList.put(HASHKEY, msg); msgRef.push().setValue(msgList); While Receiving Data with firebase method addValueEventListener() getting String in...

Iterate nodes to get child key value

javascript,node.js,firebase
So here is how my test firebase looks I want to be able to go through the entire list and match the name with a string and if it matches, return the CID. This is what I'm trying from the official documentation but it returns undefined. fb.on('value', function(snapshot){ var data...

generate custom key with $add angularfire

javascript,firebase,angularfire
How can I generate a custom key in array inside angularfire when I add a new record with the $add function. Just look at when the is the comment below in the source code. This is my code below but still get the random key generated by firebase. register :...

Firebase data ordering

android,firebase
I feel as if I'm missing something big when I use firebase in my android app. I have been using push(); to put my data in firebase with a unique id. I have been accessing this data in an activity using the ChildEventListener: ref.addChildEventListener(new ChildEventListener() { // Retrieve new posts...

Message gurantees on rapidly updated entities in Firebase

firebase
I'd like to understand how Firebase and listening Clients behave in the situation where a large number of updates are made to an entity in a short amount of time, and a client is listening to 'value' changes on that entity. Say I have an entity in firebase with some...

Display items in reverse order from Firebase in ng-repeat

firebase,ionic-framework,angularfire
My issue is similar to the SO question below Reverse order of items pulled from database in ng-repeat HOWEVER, I am using the following method to bind all the transactions for a specific AccountID var syncObject = $firebaseObject(fb.child("members/" + fbAuth.uid + "/accounts/" + $scope.AccountId)); syncObject.$bindTo($scope, "data"); The difference from the...