Skip to content

Commit

Permalink
fix destroySession for cookies with maxAge (#1032)
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan Carniato <[email protected]>
  • Loading branch information
AlexErrant and ryansolid authored Aug 29, 2023
1 parent 63dfdcc commit 697f435
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/start/session/cookieStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const createCookieSessionStorageFactory =
async destroySession(_session, options) {
return cookie.serialize("", {
...options,
maxAge: undefined,
expires: new Date(0)
});
}
Expand Down
1 change: 1 addition & 0 deletions packages/start/session/sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ export const createSessionStorageFactory =
await deleteData(session.id);
return cookie.serialize("", {
...options,
maxAge: undefined,
expires: new Date(0)
});
}
Expand Down

0 comments on commit 697f435

Please sign in to comment.