Skip to content

v9.0.0-beta.1

Pre-release
Pre-release

Choose a tag to compare

@vvo vvo released this 30 Aug 20:43
· 8 commits to main since this release
4640b36
pnpm add iron-session@beta

Upgrading turnshift, a real Next.js app, to beta.0 broke its logout with a 500. Four guards were louder than they needed to be. Report anything else in #951.

What changed since beta.0

  • destroy() then save() no longer throws. Lots of logout handlers call both, and a cleared cookie is the end state they wanted. Writing fields back in and then saving still throws, because that silently keeps the user signed in.
  • A stale cookieOptions.expires only fails when saving. It used to throw on read too, so a page that just reads a session returned a 500 over a write-time option.
  • A ttl of 60 or less keeps its full Max-Age. ttl: 30 produced a one-second cookie.
  • The "not JSON serializable" error names the value, for example (session.user.lastSeen is a Date), instead of leaving you to find it.

The full v9 notes are in v9.0.0-beta.0, and MIGRATION.md is up to date.