LibreChat/client/src/components
Danny Avila 71a3b48504
🔑 fix: Require OTP Verification for 2FA Re-Enrollment and Backup Code Regeneration (#12223)
* fix: require OTP verification for 2FA re-enrollment and backup code regeneration

* fix: require OTP verification for account deletion when 2FA is enabled

* refactor: Improve code formatting and readability in TwoFactorController and UserController

- Reformatted code in TwoFactorController and UserController for better readability by aligning parameters and breaking long lines.
- Updated test cases in deleteUser.spec.js and TwoFactorController.spec.js to enhance clarity by formatting object parameters consistently.

* refactor: Consolidate OTP and backup code verification logic in TwoFactorController and UserController

- Introduced a new `verifyOTPOrBackupCode` function to streamline the verification process for TOTP tokens and backup codes across multiple controllers.
- Updated the `enable2FA`, `disable2FA`, and `deleteUserController` methods to utilize the new verification function, enhancing code reusability and readability.
- Adjusted related tests to reflect the changes in verification logic, ensuring consistent behavior across different scenarios.
- Improved error handling and response messages for verification failures, providing clearer feedback to users.

* chore: linting

* refactor: Update BackupCodesItem component to enhance OTP verification logic

- Consolidated OTP input handling by moving the 2FA verification UI logic to a more consistent location within the component.
- Improved the state management for OTP readiness, ensuring the regenerate button is only enabled when the OTP is ready.
- Cleaned up imports by removing redundant type imports, enhancing code clarity and maintainability.

* chore: lint

* fix: stage 2FA re-enrollment in pending fields to prevent disarmament window

enable2FA now writes to pendingTotpSecret/pendingBackupCodes instead of
overwriting the live fields. confirm2FA performs the atomic swap only after
the new TOTP code is verified. If the user abandons mid-flow, their
existing 2FA remains active and intact.
2026-03-14 01:51:31 -04:00
..
Agents 🌗 refactor: Consistent Mermaid Theming for Inline and Artifact Renderers (#12055) 2026-03-04 09:28:19 -05:00
Artifacts 📦 chore: bump mermaid and dompurify (#12159) 2026-03-09 14:47:59 -04:00
Audio ️ fix: Accessibility, UI consistency, dialog & avatar refactors (#9975) 2025-10-07 14:12:49 -04:00
Auth 🪃 fix: Prevent Recursive Login Redirect Loop (#11964) 2026-02-26 16:10:14 -05:00
Banners 🧠 style: Expanded Thinking footer, Banner links, and Copy Thoughts accessibility (#11142) 2025-12-29 13:49:18 -05:00
Bookmarks 🪄 refactor: UI Polish and Admin Dialog Unification (#11108) 2025-12-28 11:01:25 -05:00
Chat fix: Resolve Agent Provider Endpoint Type for File Upload Support (#12117) 2026-03-07 10:45:43 -05:00
Conversations 🔍 fix: Correct Conversations ARIA Role and Increase Placeholder Contrast (#12021) 2026-03-02 21:25:48 -05:00
Endpoints 🎞️ refactor: Image Rendering with Preview Caching and Layout Reservation (#12114) 2026-03-06 19:09:52 -05:00
Files 🔇 fix: Hide Button Icons from Screen Readers (#10776) 2025-12-11 16:35:17 -05:00
Input 🪦 refactor: Remove Legacy Code (#10533) 2025-12-11 16:36:12 -05:00
MCP fix: Resolve Agent Provider Endpoint Type for File Upload Support (#12117) 2026-03-07 10:45:43 -05:00
MCPUIResource 👨‍✈️ chore: Minor MCP-UI Logic Cleanup (#10950) 2025-12-12 17:10:57 -05:00
Messages 🎞️ refactor: Image Rendering with Preview Caching and Layout Reservation (#12114) 2026-03-06 19:09:52 -05:00
Nav 🔑 fix: Require OTP Verification for 2FA Re-Enrollment and Backup Code Regeneration (#12223) 2026-03-14 01:51:31 -04:00
OAuth 🪟 feat: DataTable update + Various UI enhancements (#9698) 2025-12-11 16:39:06 -05:00
Plugins/Store 💎 fix: Gemini Image Gen Tool Vertex AI Auth and File Storage (#11923) 2026-02-24 08:21:02 -05:00
Prompts 🗣 fix: Add Various State Change Announcements (#11495) 2026-02-05 16:42:15 +01:00
Share 🎞️ refactor: Image Rendering with Preview Caching and Layout Reservation (#12114) 2026-03-06 19:09:52 -05:00
SharePoint 🎨 style: Theming in SharePointPickerDialog, PrincipalAvatar, and PeoplePickerSearchItem 2025-08-13 16:24:23 -04:00
Sharing 🔧 refactor: Permission handling for Resource Sharing (#11283) 2026-01-10 14:02:56 -05:00
SidePanel fix: Resolve Agent Provider Endpoint Type for File Upload Support (#12117) 2026-03-07 10:45:43 -05:00
System feat: Prevent Screen Sleep During Response Generation (#10597) 2025-11-21 09:14:32 -05:00
Tools ♻️ refactor: On-demand MCP connections: remove proactive reconnect, default to available (#11839) 2026-02-17 22:33:57 -05:00
ui 🧩 feat: Standardize empty states, improve MCP icon upload accessibility, and refine UI layout (#11195) 2026-01-05 13:46:35 -05:00
Web 📦 chore: npm audit bump (#12074) 2026-03-04 20:25:12 -05:00
index.ts 🔧 refactor: Organize Sharing/Agent Components and Improve Type Safety 2025-08-13 16:24:20 -04:00