1

As per this merge torii has been merged into emberfire. There isn't much on the google about how to use it though. I've tried to look at some of the integration tests in emberfire to figure it out, but to no avail.

I'm looking for an implementation similar to the old approach, or really just anything that works:

import Ember from 'ember';

export default Ember.Route.extend({
  beforeModel: function() {
    return this.get("session").fetch().catch(function() {});
  },
  actions: {
    signIn: function(provider) {
      this.get("session").open("firebase", { provider: "google"}).then(function(data) {
        console.log(data.currentUser);
      });
    },
    signOut: function() {
      this.get("session").close();
    }
  }
});

Where you can the use session in your .hbs templates. Can anyone point me in the right direction / give an example?

4

0 回答 0