title: Firebase 3.0 + Ember 2.0: The Torii adapter must implement `open` for a session to be opened
body: <p>I'm having an issue with facebook authentication with the torii adapter, the error being: 'The Torii adapter must implement <code>open</code> for a session to be opened'.</p>
  
  <p>I've visited many tutorials, and tried all presented methods, but most of them are usually old ember code and none of them seem to actually work.</p>
  
  <p>Current state: I am able to login, I get the facebook popup and I can authorize. </p>
  
  <p>Using fiddler, I can also see the response from the API containing a JSON response with all credentials from the user I authenticated with.
  In the firebase console, I can see the authorized user, reset its password, deny access,...</p>
  
  <p>All this leads me to believe that it's 'merely' a front-end issue where I can't seem to establish a proper 'session' to work with.</p>
  
  <p>My end goal would be to pick up the relevant user data and transfer it to my firebase backend as a 'user' entry, allowing for quick registration for site visitors, but I'll be more than glad to have an active session so I can work out the rest on my own.</p>
  
  <p>As a front-end rookie (I normally code C#), Ember may not have been the best choice to get the hang it, but I'm this far now, I'm not about to let it all slide and pick up a different framework.</p>
  
  <p>My code:</p>
  
  <p>config/environment.js</p>
  
  <pre><code>firebase: {
      apiKey: 'xxxxxxx',
      authDomain: 'myappname.firebaseapp.com',
      databaseURL: 'https://myappname.firebaseio.com',
      storageBucket: 'myappname.appspot.com',
      messagingSenderId: '1234567890'
    },
  
      torii: {
        sessionServiceName: 'session'
      }
  </code></pre>
  
  <p>torii-adapters/application.js (I've changed this so much, I can't even remember what the original code was, because none of what I change/add/delete here seems to do anything at all.)</p>
  
  <pre><code>import Ember from 'ember';
  import ToriiFirebaseAdapter from 'emberfire/torii-adapters/firebase';
  
  export default ToriiFirebaseAdapter.extend({
    firebase: Ember.inject.service(),
  });
  </code></pre>
  
  <p>routes/application.js</p>
  
  <pre><code>import Ember from 'ember';
  
  export default Ember.Route.extend({
      beforeModel: function() {
      return this.get('session').fetch().catch(function() {
      });
    },
  
    actions:{
  
      login: function(provider) {
        this.get('session').open('firebase', {
          provider: provider,
        }).then(function(data) {
          console.log(data.currentUser);
        });
      },
  
      logout: function() {
        this.get('session').close().then(function() {
          this.transitionTo('application');
        }.bind(this));
      }
    }
  });
  </code></pre>
  
  <p>application.hbs</p>
  
  <pre><code>&lt;div class="container"&gt;
    {{partial 'navbar'}}
  &lt;a {{action "signIn" "facebook"}} class="btn"&gt;{{fa-icon "facebook"}}&lt;/a&gt;
  &lt;a {{action "signIn" "twitter"}} class="btn"&gt;{{fa-icon "twitter"}}&lt;/a&gt;
  &lt;a {{action "signIn" "github"}} class="btn"&gt;{{fa-icon "github"}}&lt;/a&gt;
  &lt;a {{action "signIn" "google"}} class="btn"&gt;{{fa-icon "google"}}&lt;/a&gt;
    {{outlet}}
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>EDIT 1</strong></p>
  
  <p>Above code is giving me alot more errors after restarting ember server. Is this the cause of my troubles ? All the changes that seemingly didn't change a thing, weren't registered until after a server restart ? If that's the case, I may have passed the correct solution about a hundred times already...</p>
  
  <p><strong>EDIT 2</strong></p>
  
  <p>Changed the code to reflect the actual issue. The previous code was screwed beyond measure, but I never realized it because it didn't pick up until after a server restart.</p>
  
  <p><strong>EDIT 3</strong>
  Found and tried this, to no avail: <a href="https://stackoverflow.com/a/32079863/4309050">https://stackoverflow.com/a/32079863/4309050</a></p>