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

SDK: session expiry should be its own route #645

Closed
sergei-maertens opened this issue Feb 14, 2024 · 0 comments · Fixed by #649
Closed

SDK: session expiry should be its own route #645

sergei-maertens opened this issue Feb 14, 2024 · 0 comments · Fixed by #649
Assignees

Comments

@sergei-maertens
Copy link
Member

Now we have clunky state management and container routes that perform side effects (such as creating a new submission).

Instead, when the user session expires, we should (client-side) redirect to a dedicated page showing the message, and the side effect should be that any session data and state (sessionStorage and the like) are cleared.

@sergei-maertens sergei-maertens self-assigned this Feb 14, 2024
@sergei-maertens sergei-maertens converted this from a draft issue Feb 14, 2024
@sergei-maertens sergei-maertens moved this from Todo to In Progress in Development Feb 19, 2024
@nikkiysendoorn1 nikkiysendoorn1 linked a pull request Feb 20, 2024 that will close this issue
@sergei-maertens sergei-maertens moved this from In Progress to Implemented in Development Feb 21, 2024
@nikkiysendoorn1 nikkiysendoorn1 moved this from Implemented to In Progress in Development Feb 21, 2024
@nikkiysendoorn1 nikkiysendoorn1 moved this from In Progress to Implemented in Development Feb 21, 2024
@nikkiysendoorn1 nikkiysendoorn1 moved this from Implemented to In Progress in Development Feb 26, 2024
@nikkiysendoorn1 nikkiysendoorn1 moved this from In Progress to Implemented in Development Feb 28, 2024
sergei-maertens pushed a commit that referenced this issue Mar 12, 2024
The component is responsible for cleanup of local/session storage and
resetting the session expiry if not done so yet.

Because the component is mounted on its own route, it will cause all
other components that trigger the redirect to be unmounted and their
state will automatically be reset too, leaving only the persistent
storages like session/local storage to be cleaned up.
sergei-maertens pushed a commit that referenced this issue Mar 12, 2024
The expiry hook now tracks when the session will expire and performs
a redirect when the session is effectively expired, which in turn
triggers the necessary cleanup effects.

The SessionTrackerModal is a rename of the RequireSession component,
which now only has to keep track of imminent expiry of the session
so that the end-user receives a warning and can opt to extend the
session.

Usage of these components is cleaned up, which in general simplifies
state management a bit.
@github-project-automation github-project-automation bot moved this from Implemented to Done in Development Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants