-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add expiry for tokens #25
Conversation
Hey @lauraannwilliams, thanks a lot for providing this PR! Great! Could you have a look at the failing specs on Travis and add some information to the readme about the new configuration option? After this I will have a detailed look at your changes. |
@lauraannwilliams Isn't this the same functionality as the devise timeoutable module (http://www.rubydoc.info/github/plataformatec/devise/master/Devise/Models/Timeoutable) gives us? |
4eb2d93
to
7c4b9fb
Compare
I actually think this would be a good improvement. The devise timeoutable module doesn't quite accomplish the same thing. Timeoutable will invalidate a session after a period of inactivity, but if you include the same auth token in every request, a new session will be created each time and thus the token will never be reset. |
@baschtl I've resurrected this PR (and fixed the specs) v0.4.6...TetrationAnalytics:v0.4.7 but since there isn't a branch for v0.4.6 I can't submit a PR. |
Changes were incorporated in version 0.4.9. Thanks @lauraannwilliams ! |
Does the introduction of this PR requires a
|
Yes @leonelgalan See here: Should we make it so this field isn't required, @baschtl ? |
I missed there. Specially being a 0.0.x increase, I didn't expect breaking changes. My gut says yes, as long as the setting is optional and off by default the field should too. I'll take a look. EDIT: Backtracking, it might also be good to improve the README. Currently it doesn't mention the fields needed on the DB. Most of us come from Devise having this feature and this gem allowing us to keep that behavior, but for newcomers. |
@mikwat Yes, optional would be good. I just did not have the time to reason about it. It should only be optional if @leonelgalan Thanks for the input. You are also welcome to improve the readme via a pull request. :-) |
@baschtl Here's a fix (if you create a branch for 0.4.9 I can send a proper PR): v0.4.9...TetrationAnalytics:optional-token-expires-in CC: @leonelgalan |
adds a configuration value and check for expired tokens, to create auth tokens that expire at a custom time