-
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
Headers not present in all requests #851
Comments
I suspect you've already solved this, but for people landing here from google: I've had this problem, too - but it turns out it's expected behavior. New tokens are sent only when it's time for the token to change. So if you fire of a bunch of requests all at once, the first response will have a new token in the header, and then rest will have no token in the header at all. Always use whichever token has the latest expiry date, and keep using that token until a response comes bearing a new one. |
Didn't solve it yet :/ |
@diiq Do you know when does that happen? |
There are two config variables that control that, I think:
The batch request throttle says "allow a buncha requests to come in all at the same time to use the same token", and change headers says "send a new token with one request from each batch". (You can turn off changing tokens entirely by setting |
For those still having this issue, I had fixed by clearing all existing tokens, |
Hi !
I'm actually experiencing a strange issue: my headers with the tokens are not sent in each request, but only some of them. I don't really understand, because one of my controllers has
before_action :authenticate_v1_admin_user!
, but not the other, and it's the one withbefore_action :authenticate_v1_admin_user!
who isn't sending the headers.I'm using Rails 5.0.2, with
gem 'devise_token_auth', '~> 0.1.40'
Thanks for your help !
The text was updated successfully, but these errors were encountered: