-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authorized Users Only on iOS client #792
Comments
+1 |
@tghsoftdev Is this fixed, yet? |
@iduuck no, I still have this problem and couldn't find a solution yet. Do you have this problem too? |
@tghsoftdev Yeah I have it too... |
+1 |
1 similar comment
+1 |
I managed to fix it but changing file manually, if they don't update this issue, in furthest versions it has to be done again! It works on IOs and Android route: ../app/controllers/devise_token_auth/concerns/set_user_by_token.rb
before ---> def update_auth_header
end <-------- after ---> def update_auth_header
end <-------- |
I guess here is the fix: #703 |
Waiting on #703 to be merged |
#703 has been merged! Try pointing to master to try it out. Closing this for now but feel free to reopen if this didn't fix it. |
I have an android and web clients using retrofit that work perfectly but my iOs client is giving me "Authorized Users Only", I presume the problem occurs after doing batch requests.
I've tried using Swift 2 native NSURLRequests and Alamofire but I'm still recieving the error message.
The API was built using Devise 4.2, Devise Token Auth 0.1.39, Ruby 2.3.1 and Rails 4.2.7.1 using token authentication.
After I log in and get the user credentials I randomly get "Authorized Users Only" when doing requests. I'm sending the following headers on every request:
HEADERS: ["content-type": "application/json", "Token-Type": "Bearer", "Uid": "carrier01@example.com", "accept": "application/json", "connection": "keep-alive", "Expiry": "1483034285", "Access-Token": "K4dVv2F6AZW78CW1scrF6w", "Client": "_l5mGyZqt5n15W6Val9g2g"]
I'm storing access-token, token-type, uid and client on every response and sending them when doing a new request. Except when I do batch requests, then I keep the lastest headers and work with those until I recieve a new ones.
For example:
Request 1:
Response 1:
Request 2:
Response 2:
Request 3:
Response 3:
Am I doing something wrong? I hope you could help me, this just happen on iOS.
The text was updated successfully, but these errors were encountered: