feat(FOUR-28542): Authenticator app option still available even the user has already configured it. - #9058
feat(FOUR-28542): Authenticator app option still available even the user has already configured it.#9058rodriquelca wants to merge 1 commit into
Conversation
…ser has already configured it.
PR SummaryMedium Risk Overview On login, the Authenticator app link and QR route are only offered when the user has auth app in their valid 2FA methods and is not yet configured; a successful 6-digit code sets the timestamp. Admins can clear setup with PUT Adds feature tests for the reset API and OTP/QR/setup behavior. Reviewed by Cursor Bugbot for commit 72809c4. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 72809c4. Configure here.
| { | ||
| return in_array(self::AUTH_APP, $user->getValid2FAPreferences(), true) | ||
| && !$user->hasAuthAppConfigured(); | ||
| } |
There was a problem hiding this comment.
Username change locks authenticator users
High Severity
userCanSetUpAuthApp hides QR setup once auth_app_configured_at is set, but the TOTP secret is derived from username. A username change invalidates existing codes and leaves auth_app_configured_at set, so users with only Authenticator App cannot re-enroll. Self-service profile updates allow username changes, and reset is admin-only, so those users cannot recover on their own.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 72809c4. Configure here.







Issue & Reproduction Steps
Issue: On the 2FA login screen, the Authenticator app link and QR setup remain available after a user has already configured Google Authenticator. Anyone with access to the login session can register a new device and pass 2FA.
Repro:
Admin → Settings → Log-In Options: enable Require Two Step Authentication and select Authenticator App
Log in with a regular user (not SSO)
On /2fa, click Authenticator app → scan QR with Google Authenticator → enter code → enter the app
Log out and log in again
Actual: Authenticator app link still appears; QR can be scanned again on another device.
Expected: Link appears only on first setup; later logins only ask for the code. Admin can reset configuration.
Solution
app_auth.mov
How to Test
Related Tickets & Packages
Code Review Checklist