{"action":"created","comment":{"url":"https://api.github.com/repos/simplabs/ember-simple-auth/pulls/comments/46201476","id":46201476,"diff_hunk":"@@ -44,59 +43,80 @@ export default Ember.ObjectProxy.extend(Ember.Evented, {\n   },\n \n   restore() {\n-    return new Ember.RSVP.Promise((resolve, reject) => {\n-      let restoredContent   = this.store.restore();\n-      let { authenticator } = (restoredContent.authenticated || {});\n-      if (!!authenticator) {\n-        delete restoredContent.authenticated.authenticator;\n-        getOwner(this).lookup(authenticator).restore(restoredContent.authenticated).then((content) => {\n+    return new RSVP.Promise((resolve, reject) => {\n+      this._callStoreAsync('restore').then((restoredContent) => {\n+        let { authenticator } = (restoredContent.authenticated || {});\n+        if (!!authenticator) {\n+          delete restoredContent.authenticated.authenticator;\n+          getOwner(this).lookup(authenticator).restore(restoredContent.authenticated).then((content) => {\n+            this.set('content', restoredContent);\n+            this._setup(authenticator, content).then(resolve, reject);\n+          }, () => {\n+            Ember.Logger.debug(`The authenticator \"${authenticator}\" rejected to restore the session - invalidating…`);\n+            this.set('content', restoredContent);\n+            this._clear().then(resolve, reject);","path":"addon/internal-session.js","position":63,"original_position":63,"commit_id":"b8a71f15b646577eb9b946689e501ecf26393ebf","original_commit_id":"b8a71f15b646577eb9b946689e501ecf26393ebf","user":{"login":"marcoow","id":1510,"avatar_url":"https://avatars.githubusercontent.com/u/1510?v=3","gravatar_id":"","url":"https://api.github.com/users/marcoow","html_url":"https://github.com/marcoow","followers_url":"https://api.github.com/users/marcoow/followers","following_url":"https://api.github.com/users/marcoow/following{/other_user}","gists_url":"https://api.github.com/users/marcoow/gists{/gist_id}","starred_url":"https://api.github.com/users/marcoow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcoow/subscriptions","organizations_url":"https://api.github.com/users/marcoow/orgs","repos_url":"https://api.github.com/users/marcoow/repos","events_url":"https://api.github.com/users/marcoow/events{/privacy}","received_events_url":"https://api.github.com/users/marcoow/received_events","type":"User","site_admin":false},"body":"This should always reject actually as the session isn't actually successfully restored (not actually authenticated now) in this case.","created_at":"2015-11-30T20:50:32Z","updated_at":"2015-11-30T20:50:32Z","html_url":"https://github.com/simplabs/ember-simple-auth/pull/717#discussion_r46201476","pull_request_url":"https://api.github.com/repos/simplabs/ember-simple-auth/pulls/717","_links":{"self":{"href":"https://api.github.com/repos/simplabs/ember-simple-auth/pulls/comments/46201476"},"html":{"href":"https://github.com/simplabs/ember-simple-auth/pull/717#discussion_r46201476"},"pull_request":{"href":"https://api.github.com/repos/simplabs/ember-simple-auth/pulls/717"}}},"pull_request":{"url":"https://api.github.com/repos/simplabs/ember-simple-auth/pulls/717","id":47905555,"html_url":"https://github.com/simplabs/ember-simple-auth/pull/717","diff_url":"https://github.com/simplabs/ember-simple-auth/pull/717.diff","patch_url":"https://github.com/simplabs/ember-simple-auth/pull/717.patch","issue_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/717","number":717,"state":"open","locked":false,"title":"Making stores async","user":{"login":"rmachielse","id":2470404,"avatar_url":"https://avatars.githubusercontent.com/u/2470404?v=3","gravatar_id":"","url":"https://api.github.com/users/rmachielse","html_url":"https://github.com/rmachielse","followers_url":"https://api.github.com/users/rmachielse/followers","following_url":"https://api.github.com/users/rmachielse/following{/other_user}","gists_url":"https://api.github.com/users/rmachielse/gists{/gist_id}","starred_url":"https://api.github.com/users/rmachielse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmachielse/subscriptions","organizations_url":"https://api.github.com/users/rmachielse/orgs","repos_url":"https://api.github.com/users/rmachielse/repos","events_url":"https://api.github.com/users/rmachielse/events{/privacy}","received_events_url":"https://api.github.com/users/rmachielse/received_events","type":"User","site_admin":false},"body":"Replaces #714 \r\n\r\nThis pull request makes stores async by default.\r\nThat will allow people to build stores that persist on asynchronous storage (like chrome app storage).","created_at":"2015-10-16T12:43:44Z","updated_at":"2015-11-30T20:50:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"80976071cd6bc2731090e4d15d223c517532fe78","assignee":null,"milestone":{"url":"https://api.github.com/repos/simplabs/ember-simple-auth/milestones/21","html_url":"https://github.com/simplabs/ember-simple-auth/milestones/1.x","labels_url":"https://api.github.com/repos/simplabs/ember-simple-auth/milestones/21/labels","id":1341194,"number":21,"title":"1.x","description":"","creator":{"login":"marcoow","id":1510,"avatar_url":"https://avatars.githubusercontent.com/u/1510?v=3","gravatar_id":"","url":"https://api.github.com/users/marcoow","html_url":"https://github.com/marcoow","followers_url":"https://api.github.com/users/marcoow/followers","following_url":"https://api.github.com/users/marcoow/following{/other_user}","gists_url":"https://api.github.com/users/marcoow/gists{/gist_id}","starred_url":"https://api.github.com/users/marcoow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcoow/subscriptions","organizations_url":"https://api.github.com/users/marcoow/orgs","repos_url":"https://api.github.com/users/marcoow/repos","events_url":"https://api.github.com/users/marcoow/events{/privacy}","received_events_url":"https://api.github.com/users/marcoow/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":8,"state":"open","created_at":"2015-10-06T19:36:42Z","updated_at":"2015-11-30T07:02:17Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/simplabs/ember-simple-auth/pulls/717/commits","review_comments_url":"https://api.github.com/repos/simplabs/ember-simple-auth/pulls/717/comments","review_comment_url":"https://api.github.com/repos/simplabs/ember-simple-auth/pulls/comments{/number}","comments_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/717/comments","statuses_url":"https://api.github.com/repos/simplabs/ember-simple-auth/statuses/b8a71f15b646577eb9b946689e501ecf26393ebf","head":{"label":"rmachielse:async-stores","ref":"async-stores","sha":"b8a71f15b646577eb9b946689e501ecf26393ebf","user":{"login":"rmachielse","id":2470404,"avatar_url":"https://avatars.githubusercontent.com/u/2470404?v=3","gravatar_id":"","url":"https://api.github.com/users/rmachielse","html_url":"https://github.com/rmachielse","followers_url":"https://api.github.com/users/rmachielse/followers","following_url":"https://api.github.com/users/rmachielse/following{/other_user}","gists_url":"https://api.github.com/users/rmachielse/gists{/gist_id}","starred_url":"https://api.github.com/users/rmachielse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmachielse/subscriptions","organizations_url":"https://api.github.com/users/rmachielse/orgs","repos_url":"https://api.github.com/users/rmachielse/repos","events_url":"https://api.github.com/users/rmachielse/events{/privacy}","received_events_url":"https://api.github.com/users/rmachielse/received_events","type":"User","site_admin":false},"repo":{"id":41367298,"name":"ember-simple-auth","full_name":"rmachielse/ember-simple-auth","owner":{"login":"rmachielse","id":2470404,"avatar_url":"https://avatars.githubusercontent.com/u/2470404?v=3","gravatar_id":"","url":"https://api.github.com/users/rmachielse","html_url":"https://github.com/rmachielse","followers_url":"https://api.github.com/users/rmachielse/followers","following_url":"https://api.github.com/users/rmachielse/following{/other_user}","gists_url":"https://api.github.com/users/rmachielse/gists{/gist_id}","starred_url":"https://api.github.com/users/rmachielse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmachielse/subscriptions","organizations_url":"https://api.github.com/users/rmachielse/orgs","repos_url":"https://api.github.com/users/rmachielse/repos","events_url":"https://api.github.com/users/rmachielse/events{/privacy}","received_events_url":"https://api.github.com/users/rmachielse/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rmachielse/ember-simple-auth","description":"A lightweight library for implementing authentication/authorization in Ember.js applications.","fork":true,"url":"https://api.github.com/repos/rmachielse/ember-simple-auth","forks_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/forks","keys_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/teams","hooks_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/hooks","issue_events_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/issues/events{/number}","events_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/events","assignees_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/assignees{/user}","branches_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/branches{/branch}","tags_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/tags","blobs_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/git/refs{/sha}","trees_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/statuses/{sha}","languages_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/languages","stargazers_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/stargazers","contributors_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/contributors","subscribers_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/subscribers","subscription_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/subscription","commits_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/commits{/sha}","git_commits_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/git/commits{/sha}","comments_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/comments{/number}","issue_comment_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/issues/comments{/number}","contents_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/contents/{+path}","compare_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/merges","archive_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/downloads","issues_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/issues{/number}","pulls_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/pulls{/number}","milestones_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/milestones{/number}","notifications_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/labels{/name}","releases_url":"https://api.github.com/repos/rmachielse/ember-simple-auth/releases{/id}","created_at":"2015-08-25T14:14:34Z","updated_at":"2015-08-25T14:14:35Z","pushed_at":"2015-11-30T18:48:03Z","git_url":"git://github.com/rmachielse/ember-simple-auth.git","ssh_url":"git@github.com:rmachielse/ember-simple-auth.git","clone_url":"https://github.com/rmachielse/ember-simple-auth.git","svn_url":"https://github.com/rmachielse/ember-simple-auth","homepage":"http://ember-simple-auth.com","size":6554,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"simplabs:master","ref":"master","sha":"2464beca521e0ee63c2833e4083cc3e405fbbb26","user":{"login":"simplabs","id":56627,"avatar_url":"https://avatars.githubusercontent.com/u/56627?v=3","gravatar_id":"","url":"https://api.github.com/users/simplabs","html_url":"https://github.com/simplabs","followers_url":"https://api.github.com/users/simplabs/followers","following_url":"https://api.github.com/users/simplabs/following{/other_user}","gists_url":"https://api.github.com/users/simplabs/gists{/gist_id}","starred_url":"https://api.github.com/users/simplabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simplabs/subscriptions","organizations_url":"https://api.github.com/users/simplabs/orgs","repos_url":"https://api.github.com/users/simplabs/repos","events_url":"https://api.github.com/users/simplabs/events{/privacy}","received_events_url":"https://api.github.com/users/simplabs/received_events","type":"Organization","site_admin":false},"repo":{"id":12570984,"name":"ember-simple-auth","full_name":"simplabs/ember-simple-auth","owner":{"login":"simplabs","id":56627,"avatar_url":"https://avatars.githubusercontent.com/u/56627?v=3","gravatar_id":"","url":"https://api.github.com/users/simplabs","html_url":"https://github.com/simplabs","followers_url":"https://api.github.com/users/simplabs/followers","following_url":"https://api.github.com/users/simplabs/following{/other_user}","gists_url":"https://api.github.com/users/simplabs/gists{/gist_id}","starred_url":"https://api.github.com/users/simplabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simplabs/subscriptions","organizations_url":"https://api.github.com/users/simplabs/orgs","repos_url":"https://api.github.com/users/simplabs/repos","events_url":"https://api.github.com/users/simplabs/events{/privacy}","received_events_url":"https://api.github.com/users/simplabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/simplabs/ember-simple-auth","description":"A lightweight library for implementing authentication/authorization in Ember.js applications.","fork":false,"url":"https://api.github.com/repos/simplabs/ember-simple-auth","forks_url":"https://api.github.com/repos/simplabs/ember-simple-auth/forks","keys_url":"https://api.github.com/repos/simplabs/ember-simple-auth/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simplabs/ember-simple-auth/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simplabs/ember-simple-auth/teams","hooks_url":"https://api.github.com/repos/simplabs/ember-simple-auth/hooks","issue_events_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/events{/number}","events_url":"https://api.github.com/repos/simplabs/ember-simple-auth/events","assignees_url":"https://api.github.com/repos/simplabs/ember-simple-auth/assignees{/user}","branches_url":"https://api.github.com/repos/simplabs/ember-simple-auth/branches{/branch}","tags_url":"https://api.github.com/repos/simplabs/ember-simple-auth/tags","blobs_url":"https://api.github.com/repos/simplabs/ember-simple-auth/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simplabs/ember-simple-auth/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simplabs/ember-simple-auth/git/refs{/sha}","trees_url":"https://api.github.com/repos/simplabs/ember-simple-auth/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simplabs/ember-simple-auth/statuses/{sha}","languages_url":"https://api.github.com/repos/simplabs/ember-simple-auth/languages","stargazers_url":"https://api.github.com/repos/simplabs/ember-simple-auth/stargazers","contributors_url":"https://api.github.com/repos/simplabs/ember-simple-auth/contributors","subscribers_url":"https://api.github.com/repos/simplabs/ember-simple-auth/subscribers","subscription_url":"https://api.github.com/repos/simplabs/ember-simple-auth/subscription","commits_url":"https://api.github.com/repos/simplabs/ember-simple-auth/commits{/sha}","git_commits_url":"https://api.github.com/repos/simplabs/ember-simple-auth/git/commits{/sha}","comments_url":"https://api.github.com/repos/simplabs/ember-simple-auth/comments{/number}","issue_comment_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/comments{/number}","contents_url":"https://api.github.com/repos/simplabs/ember-simple-auth/contents/{+path}","compare_url":"https://api.github.com/repos/simplabs/ember-simple-auth/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simplabs/ember-simple-auth/merges","archive_url":"https://api.github.com/repos/simplabs/ember-simple-auth/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simplabs/ember-simple-auth/downloads","issues_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues{/number}","pulls_url":"https://api.github.com/repos/simplabs/ember-simple-auth/pulls{/number}","milestones_url":"https://api.github.com/repos/simplabs/ember-simple-auth/milestones{/number}","notifications_url":"https://api.github.com/repos/simplabs/ember-simple-auth/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simplabs/ember-simple-auth/labels{/name}","releases_url":"https://api.github.com/repos/simplabs/ember-simple-auth/releases{/id}","created_at":"2013-09-03T18:03:26Z","updated_at":"2015-11-29T23:48:21Z","pushed_at":"2015-11-30T18:48:04Z","git_url":"git://github.com/simplabs/ember-simple-auth.git","ssh_url":"git@github.com:simplabs/ember-simple-auth.git","clone_url":"https://github.com/simplabs/ember-simple-auth.git","svn_url":"https://github.com/simplabs/ember-simple-auth","homepage":"http://ember-simple-auth.com","size":8357,"stargazers_count":1251,"watchers_count":1251,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":324,"mirror_url":null,"open_issues_count":19,"forks":324,"open_issues":19,"watchers":1251,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/simplabs/ember-simple-auth/pulls/717"},"html":{"href":"https://github.com/simplabs/ember-simple-auth/pull/717"},"issue":{"href":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/717"},"comments":{"href":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/717/comments"},"review_comments":{"href":"https://api.github.com/repos/simplabs/ember-simple-auth/pulls/717/comments"},"review_comment":{"href":"https://api.github.com/repos/simplabs/ember-simple-auth/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/simplabs/ember-simple-auth/pulls/717/commits"},"statuses":{"href":"https://api.github.com/repos/simplabs/ember-simple-auth/statuses/b8a71f15b646577eb9b946689e501ecf26393ebf"}}}}