-
Notifications
You must be signed in to change notification settings - Fork 13k
feat: improve UX for logged users with mandatory 2FA roles #35709
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
Conversation
|
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: 1030bc8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 37 packages
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 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #35709 +/- ##
===========================================
- Coverage 61.16% 61.15% -0.01%
===========================================
Files 2971 2973 +2
Lines 70851 70892 +41
Branches 16189 16216 +27
===========================================
+ Hits 43333 43352 +19
- Misses 24568 24592 +24
+ Partials 2950 2948 -2
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
|
just saying, you need to choose, either it's a fix or an improvement. btw: mandatory for whom? I don't think this makes sense in your title, fell free to remove looking at your images I can already tell that there's a translation missing, or the image doesn't represent your final work. |
72842fb to
656b4c3
Compare
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
4 similar comments
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
apps/meteor/client/views/root/MainLayout/TwoFactorRequiredModal.tsx
Outdated
Show resolved
Hide resolved
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Co-authored-by: Aleksander Nicacio da Silva <[email protected]>
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Proposed changes (including videos or screenshots)
This PR introduces some new UX componentes to show the 2FA importance for users who where updated with a role that has a mandatory 2FA setting assigned.
There are also some updates changing
ButtonsforToggleSwitchcomponents.Components:

Issue(s)
Steps to test or reproduce
Set a mandatory 2FA role for a user, deactivate any 2FA settled in the user (email or TOTP).
Further comments
CORE-971
Two Factor TOTPhas a minimal change because I don't want to block this improve before release window closes. In future, some points regarding enable and disable of TOTP controll should have some refactoring. (Usage of muttations, upgrade of Meteor Method to API and so on)This pull request focuses on improving the user experience for mandatory Two-Factor Authentication (2FA) in Rocket.Chat. Key changes include:
UI Enhancements:
useRequire2faSetup, to manage UI behavior based on 2FA requirements. This hook checks if 2FA is enabled system-wide and if the user has a role requiring mandatory 2FA, while also verifying if the user has configured TOTP or Email 2FA.AccountSecurityPageto conditionally manage the UI, displaying a warning callout when 2FA setup is required.TwoFactorEmailandTwoFactorTOTPcomponents to replace separate enable/disable buttons with aToggleSwitch, improving form structure and accessibility using Fuselage components and React'suseIdhook.TwoFactorRequiredModalcomponent to inform users about the 2FA requirement, displayed via auseLayoutEffecthook.Layout Adjustments:
TextCopycomponent by replacing padding withpb(padding-bottom), which may affect layout consistency.Internationalization Updates:
These changes aim to streamline the 2FA setup process, enhance user interface consistency, and clean up outdated translation strings.
This pull request focuses on improving the user experience for roles with mandatory two-factor authentication (2FA) in the Rocket.Chat application. Key changes include:
User Interface Enhancements:
AccountSecurityPageto conditionally expand the Password or 2FA sections based on the requirement for 2FA setup, and added a warning callout for users who need to set up 2FA.TwoFactorEmailandTwoFactorTOTPcomponents by replacing separate enable/disable buttons with aToggleSwitchfor a more streamlined user interface. These components now use Fuselage components for better form structure and accessibility improvements via React'suseIdhook.New Hook Introduction:
useRequire2faSetuphook to determine if a user is required to set up 2FA based on their roles and global settings. This hook leverages reactive data sources and client-side role information.2FA Setup Check Refactor:
MainLayoutby using the newuseRequire2faSetuphook and added auseLayoutEffectto display aTwoFactorRequiredModalwhen 2FA setup is necessary.Localization Updates:
Component Style Adjustment:
TextCopycomponent by replacing padding withpb(padding-bottom), which may affect layout consistency.These changes aim to enhance the 2FA setup process, improve accessibility, and clean up localization files across the application.