LibreChat/api/server/controllers
lia-by-librechat[bot] 35d5a70b21
🧦 fix: Restore OpenID Refresh After the Session Store TTL Expires (#15983)
* 🧦 fix: Restore OpenID Refresh After the Session Store TTL Expires

express-session raises `failed to load session` only when the store holds no
record for the session id. #15655 treated that as terminal, so a refresh whose
cookie refresh token was still valid ended in 401 OPENID_SESSION_MISSING once
the OpenID session store TTL (15 minutes by default) elapsed before the IdP
access token (~1 hour with Entra ID).

Reload the persisted record through one tolerant helper: an absent record is an
empty session, not a session that advanced past this result, so publication
seeds a new record. Store outages still propagate, and logout still fails a
retired refresh token through its durable revoked publication flight.

* 🧪 test: Pin the logout fence around the tolerated session reload

Tolerating an absent session record leaves the durable revoked publication
flight as the only thing between a logged-out refresh token and a resurrected
session, so cover both of its checks with an expired record: the tombstone read
that precedes the reload, and the completion that follows it.

Drop a needless optional chain in publishResolvedSessionTokens, whose `req`
parameter is not optional.

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-09-15 23:54:42 -04:00
..
__tests__ 🫂 fix: Scope People Picker Searches to Permitted Types (#15878) 2026-09-13 02:48:27 -04:00
agents 🍯 fix: Stop Approval Pauses From Unsealing Code Environments (#15963) 2026-09-15 12:30:37 -04:00
assistants 🏦 fix: Reserve Credits for In-Flight Requests (#15879) 2026-09-13 12:53:19 -04:00
auth 🎟️ fix: Preserve OpenID Logout Token Hints (#15653) 2026-09-06 17:23:58 -04:00
AuthController.js 🚮 fix: Require Sign-In After Missing OpenID Sessions (#15655) 2026-09-06 12:47:58 -04:00
AuthController.spec.js 🧦 fix: Restore OpenID Refresh After the Session Store TTL Expires (#15983) 2026-09-15 23:54:42 -04:00
avatar.contentFilter.spec.js 🛂 feat: Filter Model-Bound Content by Source (#14425) 2026-08-21 22:43:32 -04:00
Balance.js
Balance.spec.js
EndpointController.js
FavoritesController.js
FavoritesController.spec.js
mcp.js 🛂 fix: Back Off MCP OAuth Discovery (#15783) 2026-09-09 22:21:34 -04:00
ModelController.js ⚡ perf: Reduce Agent Chat Startup Latency (#14423) 2026-07-25 07:58:20 -04:00
ModelController.spec.js ⚡ perf: Reduce Agent Chat Startup Latency (#14423) 2026-07-25 07:58:20 -04:00
PermissionsController.js 🫂 fix: Scope People Picker Searches to Permitted Types (#15878) 2026-09-13 02:48:27 -04:00
PluginController.js 🙋 feat: ask_user_question - agent-initiated questions with durable pause/resume (#14139) 2026-07-08 15:31:05 -04:00
PluginController.spec.js 🙋 feat: ask_user_question - agent-initiated questions with durable pause/resume (#14139) 2026-07-08 15:31:05 -04:00
SkillStatesController.js
TokenConfigController.js 🗂️ fix: Scope Token Config Cache (#13770) 2026-06-15 15:25:19 -04:00
tools.js ⏳ fix: Separate Temporary and General Chat Retention (#15734) 2026-09-08 11:22:54 -04:00
TwoFactorController.js
UserController.js 🛂 fix: Back Off MCP OAuth Discovery (#15783) 2026-09-09 22:21:34 -04:00
UserController.spec.js 🪬 fix: Fence Agent Checkpoint Ownership and Cleanup Recovery (#15680) 2026-09-07 22:04:59 -04:00