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

Make state expiration configurable #1217

Merged
merged 1 commit into from
Nov 9, 2021
Merged

Make state expiration configurable #1217

merged 1 commit into from
Nov 9, 2021

Conversation

aedelbro
Copy link
Contributor

@aedelbro aedelbro commented Oct 27, 2021

Overview

Currently, the cookie expiration for state is pinned to 30 minutes (that PR here). My company has a business use case to make that longer (probably 1-2 hours), however, I could see a business use case to keep that shorter than 30 minutes.
This change will make this value configurable through WebAuth, as a passed in option.
If this option is not passed in, current functionality is retained at 30 minutes.

Changes

  • WebAuth accepts a new param on options.
    • stateExpiration - number of minutes for the state to expire in (please provide any name suggestions if as coded could be more explicit)
    • This is required to pass through the option to TransactionManager
  • TransactionManager accepts the same option
    • Defaults to the existing 30 minutes

Testing

  • Configure TransactionManager with a stateExpiration with a value other than 30
  • Run generateTransaction, and see the cookie be set to expire in the given timeframe
  • This change adds unit test coverage
  • This change adds integration test coverage

Checklist

@aedelbro aedelbro requested a review from a team as a code owner October 27, 2021 14:08
Copy link
Contributor

@stevehobbsdev stevehobbsdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great 🎉 Thanks for the contribution!

@aedelbro
Copy link
Contributor Author

aedelbro commented Nov 8, 2021

@stevehobbsdev Do you have any general estimate on when this might get rolled into a release?

@stevehobbsdev
Copy link
Contributor

Yes, hoping to get this release out today 🙌

@stevehobbsdev stevehobbsdev merged commit 6e7c18f into auth0:master Nov 9, 2021
@stevehobbsdev stevehobbsdev mentioned this pull request Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants