-
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
Token expires too soon #933
Comments
There is a default limit of 10 "devices" per user. You can override this in the config file by uncommenting:
The clients seem to be expired oldest first (i.e. if I log in with by browser, then call EDIT: sorry, I just realized that you are not changing tokens with each request. In this case, calling |
Hey @nicholasshirley Thanks for your response. I generate a new token once daily. So if |
Can you tell me more about your use case? You would like to have a single user have a new token each day, but they should also be able to use an older token generated for their account so long as it is not expired? |
Yeah here's my use case. So I have a bunch of hardware (specifically RFID card readers) that fire HTTP requests to a central server once a RFID card is scanned. Although this happens over an internal network I still want some form of authentication. The way this kind of hardware works is that I can't pass any headers with a token etc, so I append them as query parameters and set the headers programmatically based on the query params once I receive these kind of requests on the central server. The configs of these RFID readers is updated each night automatically: this is where a generate a new token, basically I just change the web hook URL that these readers call when an event happens. It might be okay to invalidate all older tokens at this point. Still, I've got the impression that somehow the tokens are invalidated even before the new token is generated, which is less than a day after creation. |
just did some testing. First I created a token using I just realized I have 10+ of the RFID readers and when each one is updated at night a new token is generated for each individual unit, probably causing the first few units to get their token expired shortly when the 10th unit is updated. Going to try increasing |
Seems as if this strategy worked! @edwardmp feel free to reopen if not. |
I love this gem but stumbled into an issue lately.
I manually create a token by calling
create_new_auth_token
on a User.Right after that, the created token works fine. But a few days later it will no longer works, as if it has been expired.
Here's the strange thing though. The expiry timestamp that is returned on
create_new_auth_token
indicates a much later date (e.g. in this example 6 August 2017, yet as of today it is already expired). Is there a limit to the amount of clients stored and is the oldest removed at some point?Here's some relevant config:
The text was updated successfully, but these errors were encountered: