{"action":"opened","issue":{"url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/244","labels_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/244/labels{/name}","comments_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/244/comments","events_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/244/events","html_url":"https://github.com/lynndylanhurley/devise_token_auth/issues/244","id":76116908,"number":244,"title":"Should a 404 reset tokens?","user":{"login":"lumenlunae","id":221692,"avatar_url":"https://avatars.githubusercontent.com/u/221692?v=3","gravatar_id":"","url":"https://api.github.com/users/lumenlunae","html_url":"https://github.com/lumenlunae","followers_url":"https://api.github.com/users/lumenlunae/followers","following_url":"https://api.github.com/users/lumenlunae/following{/other_user}","gists_url":"https://api.github.com/users/lumenlunae/gists{/gist_id}","starred_url":"https://api.github.com/users/lumenlunae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lumenlunae/subscriptions","organizations_url":"https://api.github.com/users/lumenlunae/orgs","repos_url":"https://api.github.com/users/lumenlunae/repos","events_url":"https://api.github.com/users/lumenlunae/events{/privacy}","received_events_url":"https://api.github.com/users/lumenlunae/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-13T20:41:46Z","updated_at":"2015-05-13T20:41:46Z","closed_at":null,"body":"I'm building out parts of an API while working with devise_token_auth and I noticed this flow:\r\n\r\nFirst request: Make a valid API response: 200\r\nSecond request: Hit an unmatched route: 404\r\nThird request: Make another valid API response with the same token as the first request: 401\r\n\r\nI would get the 404 but no return headers, so I'm using the same access-token as the first request. It seems like the server is still changing my tokens. \r\n\r\nI'm trying to write tests for this but I don't know how to mock a proper 404 response. This is up to where I've gotten: https://github.com/lumenlunae/devise_token_auth/blob/404-token-error/test/controllers/demo_user_controller_test.rb#L262 \r\n\r\n"}}