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

Implement MAX_TOKEN_TTL setting #212

Open
joshcorne opened this issue Jun 2, 2020 · 0 comments
Open

Implement MAX_TOKEN_TTL setting #212

joshcorne opened this issue Jun 2, 2020 · 0 comments

Comments

@joshcorne
Copy link

Hi guys,

This library is great and fits my use case perfectly minus a small feature which would be great to see.

I currently keep my token ttl short which will obviously log people out from inactivity so I let them refresh it through the day. I would like set a max ttl from the creation time of the full working day so that they are logged out each evening.

This is a small business application so it is only used during business hours where the tokens would naturally expire overnight. The concern with AUTO_REFRESH: True is that it would give an attacker effectively infinite access if they have stolen a token that they can keep refreshing. Currently I am not fingerprinting IP addresses etc and the token is the only authentication method.

What I propose is a setting for MAX_TOKEN_TTL which will auto refresh up until that point at which point AUTO_REFRESH is overridden and they must get a new token. My current solution is a cron job which just deletes tokens at the end of the day but keeping it all in house with the library would be great. What do you think?

Thanks!

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

No branches or pull requests

2 participants