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

[draft] [feat]: Template for custom timeout based on metadata #24

Merged

Conversation

nelsonmaia
Copy link
Contributor

@nelsonmaia nelsonmaia commented Sep 25, 2024

Changes

Made by Nelson Matias, Okta Product Manager

Adding a new Actions template that allow using the new Auth0 feature of setting custom session timeout in Actions.

This action checks for specific metadata created either in organizations, connections or in application and use it to set custom absolute or idle timeout

  • [ x ] I described the changes on this PR.

References

This new Auth0 feature can be used in a easier way https://auth0.com/docs/secure/continuous-session-protection

  • [ x ] I added at least one link to explain why this change is needed.

Testing

Steps to Reproduce

  • Set the tenant timeout (both idle and absolute) timeout to some high number, for example 100 days
  • Create a new Organization
  • Create 2 metadata within the organization: idle_lifetime and absolute_lifetime with the timeout you wanna configure in milliseconds (Ideally something small so it is easier to test)
  • Create a new user and assign it to the organization
  • Authenticate with this user

Test 1:

  • Login in with the created user in an application ( Single Page applications will be easier to test, but it can be any)
  • After login, wait the number of milliseconds configured in the idle_lifetime. If this is a SPA, just refresh the page, if it is not make sure to trigger an authorize call again. You should see the user log out.

Test 2:

  • Login in with the created user in an application ( Single Page applications will be easier to test, but it can be any)
  • After login, keep using the application for the number of milliseconds configured in absolute_lifetime, after that the user should automatically log out. The behaviour might depend on the application, but the Auth0 session should be expired

Test 3:

  • Create a new metadata in the connection you created the user;
  • Delete the metadata in organizations
  • Repeat test 1 and 2

Test 4:

  • Create a new metadata in the application (in Auth0)
  • Delete the connection and / or the organization metadata
  • Repeat test 1 and 2

Checklist

@nelsonmaia nelsonmaia requested a review from a team as a code owner September 25, 2024 11:08
@nelsonmaia
Copy link
Contributor Author

nelsonmaia commented Oct 1, 2024

@ggoodman Added the new suggestion and some links into the comments of the actions

@ggoodman
Copy link
Contributor

ggoodman commented Oct 2, 2024

That looks good to me. I'm working to find out how we take on these changes before hitting the approve button.

@nelsonmaia
Copy link
Contributor Author

@edwardsbrentg @ggoodman I've committed all the suggested changes, would you be able to review it please?

edwardsbrentg
edwardsbrentg previously approved these changes Nov 1, 2024
@nelsonmaia nelsonmaia force-pushed the feat-template-timeout-per-metadata branch 2 times, most recently from b38b706 to dfd19a7 Compare November 1, 2024 17:12
@nelsonmaia nelsonmaia force-pushed the feat-template-timeout-per-metadata branch from dfd19a7 to 889522f Compare November 1, 2024 17:15
@edwardsbrentg edwardsbrentg merged commit 7200787 into auth0:main Nov 19, 2024
8 checks passed
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.

3 participants