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?

Chris
  • 7,830
  • 6
  • 38
  • 72
  • [Tutorial](http://zachgarwood.com/2016/01/25/user-authentication-made-easy-with-firebase/?utm_source=Ember+Weekly&utm_campaign=76bf6fe596-Ember_Weekly_Issue_144&utm_medium=email&utm_term=0_e96229d21d-76bf6fe596-106355381) on authentication with Torii and Firebase – Tyler Iguchi Feb 01 '16 at 20:01
  • 2
    @TylerIguchi this still takes on the old approach usin torii as a seperate entity. Torii has been intergrated with emberfire now, hence my question – Chris Feb 02 '16 at 08:39
  • 1
    I can also agree that there is little-to-no documentation out there on how to use this. – maxshuty Feb 10 '17 at 15:50

0 Answers0