Skip to content

Commit

Permalink
fix: session regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
kaytwo committed Dec 30, 2024
1 parent ebe2aa9 commit b06af08
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/astro/src/core/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,8 @@ export class AstroSession<TDriver extends SessionDriverName = any> {
const oldSessionId = this.#sessionID;

// Create new session
this.#sessionID = undefined;
this.#sessionID = crypto.randomUUID();
this.#data = data;
this.#ensureSessionID();
await this.#setCookie();

// Clean up old session asynchronously
Expand Down

0 comments on commit b06af08

Please sign in to comment.