WordPress / WordPress/two-factor
Setup Onboarding Login-Flow (for Enforce 2FA)
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 825
- Forks
- 187
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 17
Description
Is your enhancement related to a problem? Please describe.
Currently, Two-Factor configuration exists only as a section within the WordPress “Edit Profile” screen. There are plans to make this settings screen portable for other plugins (e.g., WooCommerce) via #335.
When Enforce 2FA becomes available through a settings option (see #255) or via a filter, users who have not yet configured Two-Factor will effectively be pushed to the default WordPress profile edit screen.
This is suboptimal for several reasons:
- The profile screen contains many unrelated fields and options (name, email, bio, etc.).
- There is no clear indication that the user is there specifically because 2FA enrollment is required.
- The experience is not structured or guided.
- It creates friction and confusion during login.
This can result in:
- Users believing they are stuck on the profile edit page without understanding why.
- Users overlooking the 2FA section entirely.
- Increased support requests.
- A forced security policy without proper UX enforcement.
In short, enforcing 2FA without a dedicated enrollment flow creates a fragmented and confusing authentication experience.
Proposed Solution
We need a dedicated login-time 2FA onboarding flow that is triggered automatically when:
- Enforce 2FA is active, and
- The user has no configured 2FA methods.
Instead of redirecting users to the generic profile page, the system should:
- Intercept the login process after successful username/password validation.
- Detect missing 2FA configuration.
- Redirect the user to a dedicated 2FA setup wizard.
- Block access to wp-admin (or frontend-protected areas) until setup is complete.
This flow should:
- Be focused exclusively on 2FA setup.
- Clearly explain why the user is seeing this screen.
- Guide users step-by-step through method selection and configuration.
- Prevent bypass until enrollment is completed (unless explicitly allowed by policy).
This ensures that “Enforce 2FA” truly behaves as a security boundary, not just a soft requirement hidden inside profile settings.
Designs
After entering username and password, if 2FA enrollment is required, users should see a dedicated onboarding screen such as:
| LearnDash | .. |
|---|---|
| TBA |
Describe alternatives you've considered
No response
Please confirm that you have searched existing issues in this repository.
Yes
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the login process after username/password validation and the existing 2FA enrollment on the WordPress Edit Profile screen. Review related work in #255 and #335, then define the dedicated setup wizard, its method-selection steps, and access blocking for wp-admin or protected frontend areas. Done means required users cannot bypass enrollment unless policy allows it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- authentication, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100