Skip to content

feat: add session rotation #1022

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
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

Conversation

nerdoza
Copy link

@nerdoza nerdoza commented Apr 15, 2025

This PR builds on the PR submitted to clear the session state (#1010) and adds a utility for rotating the session which helps resolve down stream feature requests (atinux/nuxt-auth-utils#356).

The rotation utility mutates the id and createdAt attributes stored on the session. This likely has limited use cases for eternal sessions (no maxAge set), but for sessions with expiration dates this allows the session to be extended beyond the initial TTL without requiring independent calls to clear() and update().

Ref: #1010 (comment)

@nerdoza nerdoza requested a review from pi0 as a code owner April 15, 2025 15:04
@pi0 pi0 force-pushed the main branch 2 times, most recently from 348028f to a449d79 Compare April 17, 2025 22:19
@pi0 pi0 marked this pull request as draft April 22, 2025 14:57
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.

1 participant