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: TOTP activation modal not opening for non-TOTP users with forceTotp #2299

Merged
merged 5 commits into from
Apr 4, 2024

Conversation

yomybaby
Copy link
Member

@yomybaby yomybaby commented Apr 4, 2024

This PR introduces ForceTOTPChecker to open TOTPActivateModal for users who have not activated TOTP when the forceTotp configuration is true.
This part was missing during the transition to React.

image

How to test

  • Install the TOTP plugin.
  • Set the following config.toml variables:
    [general]
    enable2FA = true
    force2FA = true
    
  • Try to log in using a user who has not activated TOTP.
  • You will see the TOTPActivateModal (refer to the screenshot above) right after logging in.

Checklist: (if applicable)

  • Mention to the original issue
  • Documentation
  • Minium required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

@yomybaby yomybaby self-assigned this Apr 4, 2024
@github-actions github-actions bot added the size:L 100~500 LoC label Apr 4, 2024
Copy link
Contributor

@agatha197 agatha197 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

github-actions bot commented Apr 4, 2024

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
3.12% (-0% 🔻)
117/3750
🔴 Branches
3.55% (-0% 🔻)
87/2452
🔴 Functions 1.53% 19/1242
🔴 Lines
3.07% (-0% 🔻)
113/3677
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴
... / ForceTOTPChecker.tsx
0% 0% 0% 0%

Test suite run success

32 tests passing in 4 suites.

Report generated by 🧪jest coverage report action from ebf5e42

@agatha197 agatha197 merged commit ed5823c into main Apr 4, 2024
8 checks passed
@agatha197 agatha197 deleted the fix/login-when-force2FA branch April 4, 2024 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L 100~500 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants