samedi 17 décembre 2016

Emberfire/Torii Adapter

I extended the ToriiFireBaseAdapter as follows with a fetch method:

 
  fetch() {
        let ref=this.get('firebaseApp');
    console.log(ref);
    let authData = ref.getAuth();

    if (!authData) {
      return Ember.RSVP.Promise.reject(new Error('No Firebase session found'));
    }

    return this._findOrCreateUser(authData)
      .then((user) => {
        return { currentUser: user };
      });
  },

There is an error on the line "let authData = ref.getAuth();" "ref.getAuth is not a function". How do I fix this and what is the best debug tool for this, so that i can inspect the object and ascertain what methods are available on the object?




Aucun commentaire:

Enregistrer un commentaire