fix(a11y): TOTP modal validation and error handling

Merged
NI
6mo ago
+245-187

fix modal not closing when entering wrong code. fixed inline error to display correct text

WA-60
WA-33

Summary by CodeRabbit

  • Bug Fixes

    • Corrected the error message shown for invalid two-factor codes.
    • Improved handling of invalid 2FA attempts with clearer user feedback.
    • Non-2FA login errors are now surfaced more reliably.
  • Refactor

    • Modernized the 2FA and password+TOTP login flows to use async promises, improving stability and responsiveness without changing user behavior.