title: Ember.js -- how to access data in Ember session from route
body: <p>Using ember-simple-auth I set up a session and set the currentUser key equal to the user object returned from the server (<strong>edit</strong>: contents of entire session.js file):</p>
  
  <pre><code>//app/services/session.js
  
  import Ember from 'ember';
  import ESASession from "ember-simple-auth/services/session";
  
  export default ESASession.extend({
  
    store: Ember.inject.service(),
    session: Ember.inject.service(),
  
  
    setCurrentUser: function () {
      if (this.get('isAuthenticated')) {
          const accountId = this.get('session.content.authenticated.user_id');
          console.log(accountId);
          this.get('store').findRecord('user', accountId).then(user =&gt; {
              this.set('currentUser', user);
          });
      }
    }.observes('isAuthenticated')
  });
  </code></pre>
  
  <p>Problem is when I am trying to access the 'currentUser' key from a route for a data relation:</p>
  
  <pre><code>user: Ember.computed(function(){
      console.log(this.get('session'));
      //return `${this.get('session.currentUser')}`;
    }),
  </code></pre>
  
  <p>In the console I see (in addition to a bunch of other stuff):</p>
  
  <pre><code> currentUser: Class 
  </code></pre>
  
  <p>but if I try to log 'session.currentUser' I am seeing undefined.</p>
  
  <p>What can I do to access the user ID from this route? Having a lot of trouble with this! Thanks in advance :D</p>