emberfire

How to use emberfire to query a firebase db for all items with name equalTo xyz in ember.js 2.0.0?

邮差的信 提交于 2019-12-06 02:33:53
问题 I'm new to ember.js and firebase. I've been trying to make something that needs me to query the DB for a key matching a defined value. According to guides.emberjs.com, the following example should work: this.store.query('person', { filter: { name: 'Peter' } }).then(function(peters) { // Do something with `peters` }); But it doesn't. Apparently because I'm using the emberfire addon. After literally hours of googling, there was no clear solution. The emberfire docs talk about the available

How to use emberfire to query a firebase db for all items with name equalTo xyz in ember.js 2.0.0?

天大地大妈咪最大 提交于 2019-12-04 06:15:49
I'm new to ember.js and firebase. I've been trying to make something that needs me to query the DB for a key matching a defined value. According to guides.emberjs.com , the following example should work: this.store.query('person', { filter: { name: 'Peter' } }).then(function(peters) { // Do something with `peters` }); But it doesn't. Apparently because I'm using the emberfire addon. After literally hours of googling, there was no clear solution. The emberfire docs talk about the available arguments. Arguments orderBy - String - The property ... . . . equalTo - String , Number , Null - Creates

How to specify async belongsTo/hasMany relationships in emberfire/emder-data?

家住魔仙堡 提交于 2019-12-02 08:42:48
I am very new at Ember/ED/EmberFire so apologies if this is a trivial question. I am able to save records to Firebase but I am unable to specify relationships to those records in my controller. I am using DEBUG: Ember : 1.10.0 DEBUG: Ember Data : 1.0.0-beta.12 DEBUG: Firebase : 2.2.3 DEBUG: EmberFire : 1.4.3 DEBUG: jQuery : 1.11.2 I have a model as such: var Patient = DS.Model.extend({ lastName: DS.attr('string'), firstName: DS.attr('string'), encounters: DS.hasMany('encounter', {async: true}) }); var Encounter = DS.Model.extend({ dateOfEncounter: DS.attr('string'), patient: DS.belongsTo(

How do I set up roles in firebase auth?

此生再无相见时 提交于 2019-12-02 07:11:07
问题 I am currently logging in with email and password. But I would like to be able to assign a role to each user: admin or user. I have read that this is done by using the custom auth method, but I find the docs not clear to implement with email/password authentication. How would I go to set that up? I am currently using firebase for ember emberfire Update: Docs reference: https://www.firebase.com/docs/web/guide/login/custom.html 回答1: Firebase just launched support for role based access on any

How do I set up roles in firebase auth?

自古美人都是妖i 提交于 2019-12-02 04:11:15
I am currently logging in with email and password. But I would like to be able to assign a role to each user: admin or user. I have read that this is done by using the custom auth method, but I find the docs not clear to implement with email/password authentication. How would I go to set that up? I am currently using firebase for ember emberfire Update: Docs reference: https://www.firebase.com/docs/web/guide/login/custom.html Firebase just launched support for role based access on any user via custom user claims on the ID token: https://firebase.google.com/docs/auth/admin/custom-claims You

Protecting a route using Firebase Simple Login

纵饮孤独 提交于 2019-12-01 07:54:20
问题 I'm trying to implement the following sequence of events in an Ember app that uses Firebase Simple Login and ember-cli . Check if the user is authenticated before allowing entry to any route. All routes need to be authenticated. If the user is not authenticated, redirect to LoginRoute . If the user is authenticated, allow them to enter the route. In order to accomplish step 1, I reopen Ember.Route in an initializer and implement a beforeModel hook. `import LoginController from "tracking