{"action":"opened","issue":{"url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/313","labels_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/313/labels{/name}","comments_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/313/comments","events_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/313/events","html_url":"https://github.com/lynndylanhurley/devise_token_auth/issues/313","id":96180920,"number":313,"title":"Android - \"batch\" requests - 401","user":{"login":"SvehlaJan","id":4311860,"avatar_url":"https://avatars.githubusercontent.com/u/4311860?v=3","gravatar_id":"","url":"https://api.github.com/users/SvehlaJan","html_url":"https://github.com/SvehlaJan","followers_url":"https://api.github.com/users/SvehlaJan/followers","following_url":"https://api.github.com/users/SvehlaJan/following{/other_user}","gists_url":"https://api.github.com/users/SvehlaJan/gists{/gist_id}","starred_url":"https://api.github.com/users/SvehlaJan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SvehlaJan/subscriptions","organizations_url":"https://api.github.com/users/SvehlaJan/orgs","repos_url":"https://api.github.com/users/SvehlaJan/repos","events_url":"https://api.github.com/users/SvehlaJan/events{/privacy}","received_events_url":"https://api.github.com/users/SvehlaJan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-20T22:45:19Z","updated_at":"2015-07-20T22:45:19Z","closed_at":null,"body":"Hello. I'm developing native Android app and using Rails 4.2.1 with devise_token_auth for backend. After hours of trying I managed to make communication working. I set config.change_headers_on_each_request = false and in Android headers I am sending the same values with every request.\r\n\r\nHowever, the server responds unpredictably. Sometimes everything works fine, but more often requests are not authorized (even though they have still the same headers) and get authorized after a few tries. Crucial operation (which almost never works) is when device sends two request immediately.\r\n\r\nI overrode SetUserByToken concern and in logs I can see that in case of unauthorized requests it is not executed at all. In my Rails project I am using Devise simultaneously so I have suspicion that Devise could overtake the execution but I have no idea what to research more. I am an Android developer and this is my fist project with Rails (and backend).\r\n\r\nI am grateful for any suggestion what to do."}}