h3 icon indicating copy to clipboard operation
h3 copied to clipboard

feat: add session rotation

Open nerdoza opened this issue 9 months ago • 0 comments

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 (https://github.com/atinux/nuxt-auth-utils/issues/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: https://github.com/unjs/h3/pull/1010#issuecomment-2804598169

nerdoza avatar Apr 15 '25 15:04 nerdoza