-
Notifications
You must be signed in to change notification settings - Fork 5
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 Customisable Maximum Token Lifetime #80
Add Customisable Maximum Token Lifetime #80
Conversation
@chriszarate I'm interested in your take on this from a security standpoint. Longer-lived tokens are riskier. Should we set a "supermax" lifetime or leave this completely configurable by bundle users? |
@smithjw1 just to quickly weigh in here - we have a business case to extend preview token lifetimes. In our case, we don't have any security concerns, but appreciate this won't apply to everyone. Having a way to extend the lifetime beyond 3hrs would be super helpful, so any hooks to configure would be really appreciated |
I'm open to increasing the default max. Three hours was a somewhat arbitrary decision. The risk of a long-lived token is scoped to "viewing the latest revision of a specific post." I think different organizations will have different ideas about how to interpret that risk. @pwestern @artskidesign What would a more reasonable max token lifetime look like for your use case? |
@chriszarate the request we've had from the business is to extend the lifetime indefinitely - which we appreciate is far longer than many other users are likely to need. Our hope was that there would be a way to override the default max token lifetime so we could set it to 1 year. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making this suggestion, happy to approve these changes.
Merging these changes in. Thank you @artskidesign! |
This PR updates the token.php file to allow external plugins to set a custom maximum token lifetime.
Changes include:
Impact:
Allows more flexibility in setting token lifetimes through external plugins.
Maintains default maximum lifetime unless specifically overridden.