-
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
Spontaneous log out from app (presumably because of batch requests) #359
Comments
I was just having the same problem for couple of days and i found out that when a batch request was processed, my client application was extracting an access token, even though it wasn't supposed to be set in SetUserByToken concern. I'm still not sure if this is an issue with my client's app http library (using Alamofire) - some header caching or something - or if this is an issue with this library, but i was able to fix this for myself by overriding the SetUserByToken concern and specifically setting access token to constant value (such that my client app knows this means token is unchanged from previous request). Below is how it looks
Hope it helps you too. |
@finayev, thank you. Could you please share your initializer with patch? |
It looks like we are not alone with this issue: @lynndylanhurley I'm not closing this issue but feel free to close it if you see that it's the same problem. |
Hi there @fertingoff , In an effort to cleanup this project and prioritize a bit, we're marking issues that haven't had any activity in a while with a "close-in-7-days" label. If we don't hear from you in about a week, we'll be closing this issue. Obviously feel free to re-open it at any time if it's the right time or this was done in error! If you are still having the issue (especially if it's a bug report) please refer to our new Issue Template to provide some more details to help us solve it. Hope all is well. |
Sometimes I'm facing an issue of spontaneous log out from app (approximately several times a day, but it depends on intensity of usage). I examined logs but everything seems to be ok (e.g. token is present, method is working, request is very typical etc.). On a first glance it doesn't depend on anything in particular, just usual get requests. I tried to find an answer on StackOverflow and here but without luck.
In initializers/devise_token_auth.rb I have
config.token_lifespan = 4.weeks
andconfig.batch_request_buffer_throttle = 5.seconds
.Backend is on Heroku. Devise_token_auth v0.1.33. Rails 4.2.0.
I understand, that it's a bit vague. I would be happy to provide more information, just need some directions.
Would appreciate any ideas.
The text was updated successfully, but these errors were encountered: