Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Login form GUI crash after closing 2FA modal #31625

Merged

Conversation

abhipatel0211
Copy link
Contributor

@abhipatel0211 abhipatel0211 commented Feb 2, 2024

Proposed changes

This PR fixes a bug in which the LoginForm would crash upon the cancellation or closure of the 2FA modal. This issue occurred because the "totp-canceled" error was not mapped to the list of errors that could occur with this component.

Demo gif:
2FA-crash-fix

Steps to test or reproduce

  1. Enable the email or TOTP 2FA if it is not already enabled;
  2. Try to login;
  3. Click on the cancel button or in the X of the modal.

Further comments

WM-224

@abhipatel0211 abhipatel0211 requested a review from a team as a code owner February 2, 2024 19:21
Copy link

changeset-bot bot commented Feb 2, 2024

🦋 Changeset detected

Latest commit: 1649545

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 30 packages
Name Type
@rocket.chat/web-ui-registration Patch
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/api-client Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/ddp-client Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/models Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@abhipatel0211 abhipatel0211 changed the title Fix: Addressed Cursor Pointer Style and Resolved onclose App Crash in twofactorauthentication fix: Addressed Cursor Pointer Style and Resolved onclose App Crash in twofactorauthentication Feb 2, 2024
Fixed a bug in which the LoginForm would crash upon the cancellation or closure of the 2FA modal. This issue occurred because the "totp-canceled" error was not mapped to the list of errors that could occur with this component.
Copy link

codecov bot commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a21ae01) 53.70% compared to head (1649545) 54.39%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #31625      +/-   ##
===========================================
+ Coverage    53.70%   54.39%   +0.68%     
===========================================
  Files         2266     2280      +14     
  Lines        49703    50143     +440     
  Branches     10129    10230     +101     
===========================================
+ Hits         26693    27274     +581     
+ Misses       20570    20417     -153     
- Partials      2440     2452      +12     
Flag Coverage Δ
unit 76.47% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Contributor

@rique223 rique223 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @abhipatel0211, appreciate your contribution! I've reviewed your fix for the GUI crash in the 2FA modal. Unfortunately, it seemed to be more of a workaround than addressing the root cause of the issue. However, your changes led me to identify the actual problem, and I've took the freedom to implement the fix in your PR. Thanks again for your assistance.

Regarding the cursor fix, it's already addressed in this PR: #31621. Now, the "resend email" is presented as a button, enhancing the overall user experience.

@rique223 rique223 changed the title fix: Addressed Cursor Pointer Style and Resolved onclose App Crash in twofactorauthentication fix: Login form crash after closing 2FA modal Feb 2, 2024
@rique223 rique223 changed the title fix: Login form crash after closing 2FA modal fix: Login form GUI crash after closing 2FA modal Feb 2, 2024
@rique223 rique223 self-assigned this Feb 2, 2024
@hugocostadev hugocostadev added this to the 6.7 milestone Feb 6, 2024
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: needs QA labels Feb 6, 2024
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: ready to merge PR tested and approved waiting for merge labels Feb 6, 2024
@kodiakhq kodiakhq bot merged commit f612d74 into RocketChat:develop Feb 6, 2024
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA skipped stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants