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

Should be able to set rollingDuration as false (when rolling is false) #623

Merged
merged 1 commit into from
Mar 24, 2022

Conversation

adamjmcgrath
Copy link
Contributor

@adamjmcgrath adamjmcgrath commented Mar 24, 2022

Description

The types for rollingDuration don't match the run time checks that Joi does.

You should be able to set rollingDuration as false (when rolling is false)

References

fixes #591

Testing

Describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

Please include any manual steps for testing end-to-end or functionality not covered by unit/integration tests.

Also include details of the environment this PR was developed in (language/platform/browser version).

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not main

@adamjmcgrath adamjmcgrath added the review:small Small review label Mar 24, 2022
@adamjmcgrath adamjmcgrath requested a review from a team as a code owner March 24, 2022 10:54
@vercel
Copy link

vercel bot commented Mar 24, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/auth0/nextjs-auth0/F3dfQ3xSFbDN5TZVK8VpRdSRcB7Y
✅ Preview: Canceled

@@ -70,12 +70,12 @@ export default class CookieStore {
const { rolling, rollingDuration } = this.config.session;

if (typeof absoluteDuration !== 'number') {
return uat + rollingDuration;
return uat + (rollingDuration as number);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is enforced at runtime by Joi

@adamjmcgrath adamjmcgrath merged commit 15e89f5 into main Mar 24, 2022
@adamjmcgrath adamjmcgrath mentioned this pull request May 4, 2022
@evansims evansims deleted the rolling-duration-false branch July 5, 2022 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review:small Small review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"session.rollingDuration" must be false when "session.rolling" is disabled
2 participants