{"action":"created","issue":{"url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/644","labels_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/644/labels{/name}","comments_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/644/comments","events_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/644/events","html_url":"https://github.com/simplabs/ember-simple-auth/issues/644","id":103681684,"number":644,"title":"Refresh token not used","user":{"login":"sebgie","id":539213,"avatar_url":"https://avatars.githubusercontent.com/u/539213?v=3","gravatar_id":"","url":"https://api.github.com/users/sebgie","html_url":"https://github.com/sebgie","followers_url":"https://api.github.com/users/sebgie/followers","following_url":"https://api.github.com/users/sebgie/following{/other_user}","gists_url":"https://api.github.com/users/sebgie/gists{/gist_id}","starred_url":"https://api.github.com/users/sebgie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebgie/subscriptions","organizations_url":"https://api.github.com/users/sebgie/orgs","repos_url":"https://api.github.com/users/sebgie/repos","events_url":"https://api.github.com/users/sebgie/events{/privacy}","received_events_url":"https://api.github.com/users/sebgie/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-28T09:19:10Z","updated_at":"2015-08-28T15:09:20Z","closed_at":"2015-08-28T15:09:20Z","body":"We are in the middle of preparing the release of Ghost 0.7. `ember-simple-auth` was updated to version 0.8 since the last release and during testing we discovered now that sessions are expiring sooner than they did before. \r\n\r\nI was able to track this behaviour down to refresh_token not being used to acquire a new access_token if the existing access_token becomes invalid.\r\n\r\nSetup:\r\n- access_token: 1 hour\r\n- refresh_token: 1 week\r\n- store: local storage\r\n\r\nReproduction 1:\r\n- log in and acquire a valid access_token\r\n- close browser tab and wait for > 1 hour\r\n- open browser and go back to page\r\n- you are logged out now\r\n\r\nReproduction 2 (faster):\r\n- log in and acquire a valid access_token\r\n- edit the access_token stored in local storage to make it invalid\r\n- visit a page that requires authentication\r\n- you are logged out now\r\n\r\nI'm quite sure that ember-simple-auth 0.7.3 used the refresh_token and attempted to create a new access_token before the user was logged out. Did this change or is any additional setup needed to make it work again?\r\n\r\nAny help or pointers would be highly appreciated to help us get a release together :)."},"comment":{"url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/comments/135799897","html_url":"https://github.com/simplabs/ember-simple-auth/issues/644#issuecomment-135799897","issue_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/644","id":135799897,"user":{"login":"sebgie","id":539213,"avatar_url":"https://avatars.githubusercontent.com/u/539213?v=3","gravatar_id":"","url":"https://api.github.com/users/sebgie","html_url":"https://github.com/sebgie","followers_url":"https://api.github.com/users/sebgie/followers","following_url":"https://api.github.com/users/sebgie/following{/other_user}","gists_url":"https://api.github.com/users/sebgie/gists{/gist_id}","starred_url":"https://api.github.com/users/sebgie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebgie/subscriptions","organizations_url":"https://api.github.com/users/sebgie/orgs","repos_url":"https://api.github.com/users/sebgie/repos","events_url":"https://api.github.com/users/sebgie/events{/privacy}","received_events_url":"https://api.github.com/users/sebgie/received_events","type":"User","site_admin":false},"created_at":"2015-08-28T15:09:20Z","updated_at":"2015-08-28T15:09:20Z","body":"@marcoow thank you for your answers! Helped debugging the problem tremendously!\r\n\r\nReally looking forward to 1.0 :+1:!"}}