{"action":"created","issue":{"url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/811","labels_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/811/labels{/name}","comments_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/811/comments","events_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/811/events","html_url":"https://github.com/simplabs/ember-simple-auth/issues/811","id":120825989,"number":811,"title":"Session account service is lost on page reload","user":{"login":"abhayathapa","id":672845,"avatar_url":"https://avatars.githubusercontent.com/u/672845?v=3","gravatar_id":"","url":"https://api.github.com/users/abhayathapa","html_url":"https://github.com/abhayathapa","followers_url":"https://api.github.com/users/abhayathapa/followers","following_url":"https://api.github.com/users/abhayathapa/following{/other_user}","gists_url":"https://api.github.com/users/abhayathapa/gists{/gist_id}","starred_url":"https://api.github.com/users/abhayathapa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhayathapa/subscriptions","organizations_url":"https://api.github.com/users/abhayathapa/orgs","repos_url":"https://api.github.com/users/abhayathapa/repos","events_url":"https://api.github.com/users/abhayathapa/events{/privacy}","received_events_url":"https://api.github.com/users/abhayathapa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-12-07T17:26:46Z","updated_at":"2015-12-08T17:21:52Z","closed_at":null,"body":"This is my services/session-user.js\r\n```\r\nimport Ember from 'ember';\r\nimport DS from 'ember-data';\r\n\r\nconst { service } = Ember.inject;\r\n\r\nexport default Ember.Service.extend({\r\n  session: service('session'),\r\n  store: service(),\r\n  user: Ember.computed('session.data.authenticated.user_id', function() {\r\n    const userId = this.get('session.data.authenticated.user_id');\r\n    if (!Ember.isEmpty(userId)) {\r\n      return DS.PromiseObject.create({\r\n        promise: this.get('store').find('user', userId)\r\n      });\r\n    }\r\n  })\r\n});\r\n```\r\nBefore reload, both `sessionUser.user` and `session.isAuthenticated` works\r\nWhenever page is reloaded with torii authenticator, the `session.isAuthenticated` is working but `sessionUser.user` seems to get lost."},"comment":{"url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/comments/162951532","html_url":"https://github.com/simplabs/ember-simple-auth/issues/811#issuecomment-162951532","issue_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/811","id":162951532,"user":{"login":"abhayathapa","id":672845,"avatar_url":"https://avatars.githubusercontent.com/u/672845?v=3","gravatar_id":"","url":"https://api.github.com/users/abhayathapa","html_url":"https://github.com/abhayathapa","followers_url":"https://api.github.com/users/abhayathapa/followers","following_url":"https://api.github.com/users/abhayathapa/following{/other_user}","gists_url":"https://api.github.com/users/abhayathapa/gists{/gist_id}","starred_url":"https://api.github.com/users/abhayathapa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhayathapa/subscriptions","organizations_url":"https://api.github.com/users/abhayathapa/orgs","repos_url":"https://api.github.com/users/abhayathapa/repos","events_url":"https://api.github.com/users/abhayathapa/events{/privacy}","received_events_url":"https://api.github.com/users/abhayathapa/received_events","type":"User","site_admin":false},"created_at":"2015-12-08T17:21:52Z","updated_at":"2015-12-08T17:21:52Z","body":"I had `torii-providers/facebook.js` but changed to providers/facebook.js after seeing the doc  mentioned above. After using `this.get('session').authenticate('authenticator:torii', 'facebook')` it worked. Thanks. \r\n\r\nOne last problem, as Im using both devise and torii, my devise sends header properly to server with my `authorizers/application.js` as\r\n```\r\nimport DeviseAuthorizer from 'ember-simple-auth/authorizers/devise';\r\nexport default DeviseAuthorizer.extend();\r\n```\r\nAnd `adapters/application.js` as\r\n```\r\nimport DS from 'ember-data';\r\nimport DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin';\r\nexport default DS.RESTAdapter.extend(DataAdapterMixin, {\r\n  namespace: 'api',\r\n  authorizer: 'authorizer:application' \r\n});\r\n```\r\n\r\nHow do i set header from frontend to server with torii as well as im using both. Thanks in advance\r\n"}}