Skip to content

docs(auth0-express): clarify migration guide (empty sid, first-read vs next-write, dedupe) - #48

Merged
frederikprijck merged 4 commits into
mainfrom
docs/migration-clarifications
Aug 27, 2026
Merged

frederikprijck merged 4 commits into
mainfrom
docs/migration-clarifications

Conversation

@frederikprijck

Copy link
Copy Markdown
Member

Summary

Documentation and comment clarifications for the express-openid-connect migration. No behavioural change.

  • Empty-sid caveat: a migrated session's sid falls back to '' when neither the legacy session nor the ID token carries one. Backchannel logout resolves sessions by sid, so such a session can't be targeted by a logout token, and a store that indexes by sid without guarding the empty string collapses every sid-less session onto one shared key. Documented in the guide and the transformer, pointing at the example store's existing if (sid) guard.
  • Stale "on the next write" intro: the stateful store upgrades on first read, not the caller's next write. Fixed the zero-downtime intro to distinguish stateless (next write) from stateful (first read).
  • Dedupe: merged a duplicated header-exp comment in the stateless store.

Test plan

  • npm test — 264 passing (baseline, docs-only)
  • npm run build, eslint — clean

Part of a 3-PR split of the migration review findings (independent, not stacked).

A migrated session's sid falls back to '' when neither the legacy session nor
the ID token carries one. Backchannel logout resolves sessions by sid, so such
a session cannot be targeted by a logout token, and a store that indexes by sid
without guarding the empty string collapses every sid-less session onto one
shared key. Document the caveat in the migration guide and the transformer, and
point at the example store's existing `if (sid)` guard.
Since the stateful store upgrades on first read (not the caller's next write),
the zero-downtime intro's blanket 'on the next write' was wrong for stateful
sessions. Distinguish stateless (next write) from stateful (first read) and
link to the detailed section that already draws the distinction.
…tore

Two adjacent comment blocks both explained the 'mirror appSession's exp >
epoch()' expiry check; merge them into one. Leftover from an earlier change.
@frederikprijck
frederikprijck merged commit fb5ca34 into main Aug 27, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants