Skip to content
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

Sometimes very frequently, sometimes very randomly - 401 Unauthorized. #813

Closed
kedarnag138 opened this issue Jan 19, 2017 · 8 comments
Closed

Comments

@kedarnag138
Copy link

Hi,

I have used devise_token_auth with rails for the Backend to build a iOS application.

  1. I am facing an issue, where when I am making requests, I randomly get 401 Unauthorized. There is no proper flow for me to reproduce this in my application.
  2. The token just changes for some request on its own, not sure why this is happening.
  3. I am sending access-token, client and uid on request in the header.
  4. The same issue is not happening when I am trying this in my local machine. What could be the reasons ?

screen shot 2017-01-19 at 10 04 27

@xpiero
Copy link

xpiero commented Jan 23, 2017

I have exactly the same problem #792 and I'm still waiting for an answer

@kedarnag138
Copy link
Author

I am using this for building a client application and I am stuck, as I am not able to release a build, as I don't know when the "401 Unauthorized" would occur. Is there any alternatives or patches.

@dgubitsky
Copy link

Confirming the same issue

@bartes
Copy link

bartes commented Apr 13, 2017

try code from this PR: #703

@taiwoayanleye
Copy link

Maybe you need to implement the CORS has stated in the docs https://github.com/lynndylanhurley/devise_token_auth#cors
https://gyazo.com/ee77c6233aad7334b8a945f61dc0576c

@bartes
Copy link

bartes commented May 26, 2017

@onlyyouandty - there are no problems with sending request to the API but with authenticating the request (at least on my end)

@zachfeldman
Copy link
Contributor

@lynndylanhurley seems that merging #703 would allow us to close several issues :)

@zachfeldman
Copy link
Contributor

#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants