LibreChat/api/server/controllers/auth
Marco Beretta 4e0f242557
⚡ fix: Parallelize Setup Cancel Lookups and Keep Attachment Drafts on Reload (#17963)
* fix: Read the Account and Session Together and Test Cancel on a Real Database

- Start the setup user and refresh session lookups together in the cancel controller instead of one after the other, as the opt-in confirmation already does
- Run the cancel controller spec on mongodb-memory-server with the real data-schemas methods, so the session and compare-and-swap predicates under test are the production ones, and add a negative case for each
- Keep only a module wiring test in the CJS controller spec, since the database behavior is now covered where it can run for real

* test: Pin the Cancel Response When the Session Lookup Fails

Both lookups now run before any cookie or write, so a failed session lookup answers 500 with the browser and the stored state untouched. Cover that on the real database.

* fix: Keep the Saved Files Draft Until the File List Loads

After a reload the live file map is empty until the server's file list arrives, and the restore that rebuilds it needs that list. The save effect rewrote the stored draft from the empty map in between, so a pasted-text chip or any other attachment was gone before it could be restored. It now waits for the list. This is what turned the composer-attachments restore scenario red on dev.
2026-11-09 21:57:01 +01:00
..
LoginController.js 🔐 feat: Enforce Required Two-Factor Authentication (#14731) 2026-10-01 23:39:51 +02:00
LoginController.spec.js 🔐 feat: Enforce Required Two-Factor Authentication (#14731) 2026-10-01 23:39:51 +02:00
LogoutController.js 🪪 fix: Boot-Paint a Cached Theme Only for Its Signed-In Owner (#16926) 2026-10-14 11:08:53 +02:00
LogoutController.spec.js 🪪 fix: Boot-Paint a Cached Theme Only for Its Signed-In Owner (#16926) 2026-10-14 11:08:53 +02:00
oauth.js 📧 fix: Log User IDs Instead of Emails in Admin Panel Auth Flow (#17032) 2026-10-13 08:42:57 +02:00
oauth.spec.js 🧺 fix: Discard Stale Session Tokens at OpenID Login (#15668) 2026-09-06 15:07:08 -04:00
PasskeyController.js 🔐 fix: Hash Passwords on a Worker Pool and Surface API Key Lookup Failures (#17261) 2026-10-19 22:13:31 +02:00
PasskeyController.spec.js 🔐 fix: Hash Passwords on a Worker Pool and Surface API Key Lookup Failures (#17261) 2026-10-19 22:13:31 +02:00
TwoFactorAuthController.js 🚪 fix: Let Users Sign Out of Required Two-Factor Enrollment (#17956) 2026-11-09 17:40:50 +01:00
TwoFactorAuthController.spec.js ⚡ fix: Parallelize Setup Cancel Lookups and Keep Attachment Drafts on Reload (#17963) 2026-11-09 21:57:01 +01:00