v9.0.0-beta.1
Pre-release
Pre-release
pnpm add iron-session@betaUpgrading 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()thensave()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.expiresonly 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
ttlof 60 or less keeps its fullMax-Age.ttl: 30produced 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.