{"action":"closed","number":93,"pull_request":{"url":"https://api.github.com/repos/stormpath/stormpath.js/pulls/93","id":69109090,"html_url":"https://github.com/stormpath/stormpath.js/pull/93","diff_url":"https://github.com/stormpath/stormpath.js/pull/93.diff","patch_url":"https://github.com/stormpath/stormpath.js/pull/93.patch","issue_url":"https://api.github.com/repos/stormpath/stormpath.js/issues/93","number":93,"state":"closed","locked":false,"title":"Fixes Refresh Error","user":{"login":"edjiang","id":918770,"avatar_url":"https://avatars.githubusercontent.com/u/918770?v=3","gravatar_id":"","url":"https://api.github.com/users/edjiang","html_url":"https://github.com/edjiang","followers_url":"https://api.github.com/users/edjiang/followers","following_url":"https://api.github.com/users/edjiang/following{/other_user}","gists_url":"https://api.github.com/users/edjiang/gists{/gist_id}","starred_url":"https://api.github.com/users/edjiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edjiang/subscriptions","organizations_url":"https://api.github.com/users/edjiang/orgs","repos_url":"https://api.github.com/users/edjiang/repos","events_url":"https://api.github.com/users/edjiang/events{/privacy}","received_events_url":"https://api.github.com/users/edjiang/received_events","type":"User","site_admin":false},"body":"Currently, ID Site has a bug where if you load the login page, and refresh, you get the following error: \r\n\r\n<img width=\"612\" alt=\"screen shot 2016-05-05 at 11 07 20 pm\" src=\"https://cloud.githubusercontent.com/assets/918770/15065593/3e05df3a-1316-11e6-8385-241c98ed4c16.png\">\r\n\r\nThis is very easy to replicate. Go to any ID Site (you can use Tom's demo at http://shielded-journey-8142.herokuapp.com by example) and you can replicate it.\r\n\r\nI've submitted a fix for this bug. \r\n\r\nThis passes all tests but one, so I will need @robertjd, @rdegges  or someone more familiar with JS to help me with the test suite. \r\n\r\n```\r\n    describe('without a JWT in the url, and not specified by options', function () {\r\n      var result;\r\n      before(function(done){\r\n        new stormpathJs.Client(function(err,res){\r\n          result = [err,res];\r\n          done();\r\n        });\r\n      });\r\n      it('should err',function(){\r\n        assert.equal(result[0].message,strings.errors.JWT_NOT_FOUND);\r\n      });\r\n    });\r\n```\r\n\r\nThis test fails as I'm using the window object directly, and I'm not quite sure the best strategy to mock the window object. Can one of you help me fix that test, merge, and tag? Once we fix this, we should update stormpath/idsite-src and stormpath/idsite to fix this bug. ","created_at":"2016-05-06T06:10:30Z","updated_at":"2016-05-11T20:40:32Z","closed_at":"2016-05-11T20:40:32Z","merged_at":"2016-05-11T20:40:32Z","merge_commit_sha":"eddd433d5de54e2bf87af39665c6ab94fe41c602","assignee":{"login":"robertjd","id":132343,"avatar_url":"https://avatars.githubusercontent.com/u/132343?v=3","gravatar_id":"","url":"https://api.github.com/users/robertjd","html_url":"https://github.com/robertjd","followers_url":"https://api.github.com/users/robertjd/followers","following_url":"https://api.github.com/users/robertjd/following{/other_user}","gists_url":"https://api.github.com/users/robertjd/gists{/gist_id}","starred_url":"https://api.github.com/users/robertjd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertjd/subscriptions","organizations_url":"https://api.github.com/users/robertjd/orgs","repos_url":"https://api.github.com/users/robertjd/repos","events_url":"https://api.github.com/users/robertjd/events{/privacy}","received_events_url":"https://api.github.com/users/robertjd/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/stormpath/stormpath.js/pulls/93/commits","review_comments_url":"https://api.github.com/repos/stormpath/stormpath.js/pulls/93/comments","review_comment_url":"https://api.github.com/repos/stormpath/stormpath.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stormpath/stormpath.js/issues/93/comments","statuses_url":"https://api.github.com/repos/stormpath/stormpath.js/statuses/e4864fbebda8e27bc8b2faf196e008f1c28064ff","head":{"label":"stormpath:feature/refresh-works","ref":"feature/refresh-works","sha":"e4864fbebda8e27bc8b2faf196e008f1c28064ff","user":{"login":"stormpath","id":1377453,"avatar_url":"https://avatars.githubusercontent.com/u/1377453?v=3","gravatar_id":"","url":"https://api.github.com/users/stormpath","html_url":"https://github.com/stormpath","followers_url":"https://api.github.com/users/stormpath/followers","following_url":"https://api.github.com/users/stormpath/following{/other_user}","gists_url":"https://api.github.com/users/stormpath/gists{/gist_id}","starred_url":"https://api.github.com/users/stormpath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stormpath/subscriptions","organizations_url":"https://api.github.com/users/stormpath/orgs","repos_url":"https://api.github.com/users/stormpath/repos","events_url":"https://api.github.com/users/stormpath/events{/privacy}","received_events_url":"https://api.github.com/users/stormpath/received_events","type":"Organization","site_admin":false},"repo":{"id":21590769,"name":"stormpath.js","full_name":"stormpath/stormpath.js","owner":{"login":"stormpath","id":1377453,"avatar_url":"https://avatars.githubusercontent.com/u/1377453?v=3","gravatar_id":"","url":"https://api.github.com/users/stormpath","html_url":"https://github.com/stormpath","followers_url":"https://api.github.com/users/stormpath/followers","following_url":"https://api.github.com/users/stormpath/following{/other_user}","gists_url":"https://api.github.com/users/stormpath/gists{/gist_id}","starred_url":"https://api.github.com/users/stormpath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stormpath/subscriptions","organizations_url":"https://api.github.com/users/stormpath/orgs","repos_url":"https://api.github.com/users/stormpath/repos","events_url":"https://api.github.com/users/stormpath/events{/privacy}","received_events_url":"https://api.github.com/users/stormpath/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stormpath/stormpath.js","description":"Stormpath JavaScript support for browser clients","fork":false,"url":"https://api.github.com/repos/stormpath/stormpath.js","forks_url":"https://api.github.com/repos/stormpath/stormpath.js/forks","keys_url":"https://api.github.com/repos/stormpath/stormpath.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stormpath/stormpath.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stormpath/stormpath.js/teams","hooks_url":"https://api.github.com/repos/stormpath/stormpath.js/hooks","issue_events_url":"https://api.github.com/repos/stormpath/stormpath.js/issues/events{/number}","events_url":"https://api.github.com/repos/stormpath/stormpath.js/events","assignees_url":"https://api.github.com/repos/stormpath/stormpath.js/assignees{/user}","branches_url":"https://api.github.com/repos/stormpath/stormpath.js/branches{/branch}","tags_url":"https://api.github.com/repos/stormpath/stormpath.js/tags","blobs_url":"https://api.github.com/repos/stormpath/stormpath.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stormpath/stormpath.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stormpath/stormpath.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/stormpath/stormpath.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stormpath/stormpath.js/statuses/{sha}","languages_url":"https://api.github.com/repos/stormpath/stormpath.js/languages","stargazers_url":"https://api.github.com/repos/stormpath/stormpath.js/stargazers","contributors_url":"https://api.github.com/repos/stormpath/stormpath.js/contributors","subscribers_url":"https://api.github.com/repos/stormpath/stormpath.js/subscribers","subscription_url":"https://api.github.com/repos/stormpath/stormpath.js/subscription","commits_url":"https://api.github.com/repos/stormpath/stormpath.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/stormpath/stormpath.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/stormpath/stormpath.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/stormpath/stormpath.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/stormpath/stormpath.js/contents/{+path}","compare_url":"https://api.github.com/repos/stormpath/stormpath.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stormpath/stormpath.js/merges","archive_url":"https://api.github.com/repos/stormpath/stormpath.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stormpath/stormpath.js/downloads","issues_url":"https://api.github.com/repos/stormpath/stormpath.js/issues{/number}","pulls_url":"https://api.github.com/repos/stormpath/stormpath.js/pulls{/number}","milestones_url":"https://api.github.com/repos/stormpath/stormpath.js/milestones{/number}","notifications_url":"https://api.github.com/repos/stormpath/stormpath.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stormpath/stormpath.js/labels{/name}","releases_url":"https://api.github.com/repos/stormpath/stormpath.js/releases{/id}","deployments_url":"https://api.github.com/repos/stormpath/stormpath.js/deployments","created_at":"2014-07-07T23:38:05Z","updated_at":"2016-05-10T07:49:21Z","pushed_at":"2016-05-11T20:40:32Z","git_url":"git://github.com/stormpath/stormpath.js.git","ssh_url":"git@github.com:stormpath/stormpath.js.git","clone_url":"https://github.com/stormpath/stormpath.js.git","svn_url":"https://github.com/stormpath/stormpath.js","homepage":null,"size":189,"stargazers_count":15,"watchers_count":15,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":48,"forks":5,"open_issues":48,"watchers":15,"default_branch":"master"}},"base":{"label":"stormpath:master","ref":"master","sha":"dc49161c49c1b7a6aa099b86ca6919918e93b940","user":{"login":"stormpath","id":1377453,"avatar_url":"https://avatars.githubusercontent.com/u/1377453?v=3","gravatar_id":"","url":"https://api.github.com/users/stormpath","html_url":"https://github.com/stormpath","followers_url":"https://api.github.com/users/stormpath/followers","following_url":"https://api.github.com/users/stormpath/following{/other_user}","gists_url":"https://api.github.com/users/stormpath/gists{/gist_id}","starred_url":"https://api.github.com/users/stormpath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stormpath/subscriptions","organizations_url":"https://api.github.com/users/stormpath/orgs","repos_url":"https://api.github.com/users/stormpath/repos","events_url":"https://api.github.com/users/stormpath/events{/privacy}","received_events_url":"https://api.github.com/users/stormpath/received_events","type":"Organization","site_admin":false},"repo":{"id":21590769,"name":"stormpath.js","full_name":"stormpath/stormpath.js","owner":{"login":"stormpath","id":1377453,"avatar_url":"https://avatars.githubusercontent.com/u/1377453?v=3","gravatar_id":"","url":"https://api.github.com/users/stormpath","html_url":"https://github.com/stormpath","followers_url":"https://api.github.com/users/stormpath/followers","following_url":"https://api.github.com/users/stormpath/following{/other_user}","gists_url":"https://api.github.com/users/stormpath/gists{/gist_id}","starred_url":"https://api.github.com/users/stormpath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stormpath/subscriptions","organizations_url":"https://api.github.com/users/stormpath/orgs","repos_url":"https://api.github.com/users/stormpath/repos","events_url":"https://api.github.com/users/stormpath/events{/privacy}","received_events_url":"https://api.github.com/users/stormpath/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stormpath/stormpath.js","description":"Stormpath JavaScript support for browser clients","fork":false,"url":"https://api.github.com/repos/stormpath/stormpath.js","forks_url":"https://api.github.com/repos/stormpath/stormpath.js/forks","keys_url":"https://api.github.com/repos/stormpath/stormpath.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stormpath/stormpath.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stormpath/stormpath.js/teams","hooks_url":"https://api.github.com/repos/stormpath/stormpath.js/hooks","issue_events_url":"https://api.github.com/repos/stormpath/stormpath.js/issues/events{/number}","events_url":"https://api.github.com/repos/stormpath/stormpath.js/events","assignees_url":"https://api.github.com/repos/stormpath/stormpath.js/assignees{/user}","branches_url":"https://api.github.com/repos/stormpath/stormpath.js/branches{/branch}","tags_url":"https://api.github.com/repos/stormpath/stormpath.js/tags","blobs_url":"https://api.github.com/repos/stormpath/stormpath.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stormpath/stormpath.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stormpath/stormpath.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/stormpath/stormpath.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stormpath/stormpath.js/statuses/{sha}","languages_url":"https://api.github.com/repos/stormpath/stormpath.js/languages","stargazers_url":"https://api.github.com/repos/stormpath/stormpath.js/stargazers","contributors_url":"https://api.github.com/repos/stormpath/stormpath.js/contributors","subscribers_url":"https://api.github.com/repos/stormpath/stormpath.js/subscribers","subscription_url":"https://api.github.com/repos/stormpath/stormpath.js/subscription","commits_url":"https://api.github.com/repos/stormpath/stormpath.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/stormpath/stormpath.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/stormpath/stormpath.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/stormpath/stormpath.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/stormpath/stormpath.js/contents/{+path}","compare_url":"https://api.github.com/repos/stormpath/stormpath.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stormpath/stormpath.js/merges","archive_url":"https://api.github.com/repos/stormpath/stormpath.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stormpath/stormpath.js/downloads","issues_url":"https://api.github.com/repos/stormpath/stormpath.js/issues{/number}","pulls_url":"https://api.github.com/repos/stormpath/stormpath.js/pulls{/number}","milestones_url":"https://api.github.com/repos/stormpath/stormpath.js/milestones{/number}","notifications_url":"https://api.github.com/repos/stormpath/stormpath.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stormpath/stormpath.js/labels{/name}","releases_url":"https://api.github.com/repos/stormpath/stormpath.js/releases{/id}","deployments_url":"https://api.github.com/repos/stormpath/stormpath.js/deployments","created_at":"2014-07-07T23:38:05Z","updated_at":"2016-05-10T07:49:21Z","pushed_at":"2016-05-11T20:40:32Z","git_url":"git://github.com/stormpath/stormpath.js.git","ssh_url":"git@github.com:stormpath/stormpath.js.git","clone_url":"https://github.com/stormpath/stormpath.js.git","svn_url":"https://github.com/stormpath/stormpath.js","homepage":null,"size":189,"stargazers_count":15,"watchers_count":15,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":48,"forks":5,"open_issues":48,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stormpath/stormpath.js/pulls/93"},"html":{"href":"https://github.com/stormpath/stormpath.js/pull/93"},"issue":{"href":"https://api.github.com/repos/stormpath/stormpath.js/issues/93"},"comments":{"href":"https://api.github.com/repos/stormpath/stormpath.js/issues/93/comments"},"review_comments":{"href":"https://api.github.com/repos/stormpath/stormpath.js/pulls/93/comments"},"review_comment":{"href":"https://api.github.com/repos/stormpath/stormpath.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stormpath/stormpath.js/pulls/93/commits"},"statuses":{"href":"https://api.github.com/repos/stormpath/stormpath.js/statuses/e4864fbebda8e27bc8b2faf196e008f1c28064ff"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"robertjd","id":132343,"avatar_url":"https://avatars.githubusercontent.com/u/132343?v=3","gravatar_id":"","url":"https://api.github.com/users/robertjd","html_url":"https://github.com/robertjd","followers_url":"https://api.github.com/users/robertjd/followers","following_url":"https://api.github.com/users/robertjd/following{/other_user}","gists_url":"https://api.github.com/users/robertjd/gists{/gist_id}","starred_url":"https://api.github.com/users/robertjd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertjd/subscriptions","organizations_url":"https://api.github.com/users/robertjd/orgs","repos_url":"https://api.github.com/users/robertjd/repos","events_url":"https://api.github.com/users/robertjd/events{/privacy}","received_events_url":"https://api.github.com/users/robertjd/received_events","type":"User","site_admin":false},"comments":4,"review_comments":12,"commits":14,"additions":73,"deletions":6,"changed_files":3}}