mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-16 13:00:55 +00:00
With `OPENID_REUSE_TOKENS=true`, `sendOpenIDAuthResponse` compares the incoming token set against `req.session.openidTokens`. Passport runs with `session: false`, so the Express session is never regenerated at login and a token set from an earlier authentication survives there. Its refresh token differs from the one the IdP just issued, which the advanced-session check reads as "a concurrent refresh already advanced the session": the fresh IdP tokens are discarded and the stale set is republished. When that stale access token has already expired, the completed flight's TTL clamps to 1ms and the publication assertion fails with "OpenID refresh result is no longer available for publication", which fails every login for as long as the stale session lives. The advanced-session comparison exists for refresh races and has no business at a fresh authorization-code login. The login controller now asks the publication service to discard whatever the session holds, and the service does so after its own session reload so the store cannot resurrect the stale set. Refresh callers are unchanged. Fixes #15648 |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| agents | ||
| assistants | ||
| auth | ||
| AuthController.js | ||
| AuthController.spec.js | ||
| avatar.contentFilter.spec.js | ||
| Balance.js | ||
| Balance.spec.js | ||
| EndpointController.js | ||
| FavoritesController.js | ||
| FavoritesController.spec.js | ||
| mcp.js | ||
| ModelController.js | ||
| ModelController.spec.js | ||
| PermissionsController.js | ||
| PluginController.js | ||
| PluginController.spec.js | ||
| SkillStatesController.js | ||
| TokenConfigController.js | ||
| tools.js | ||
| TwoFactorController.js | ||
| UserController.js | ||
| UserController.spec.js | ||