WordPress / WordPress/two-factor

Require verification before activating Email TOTP

Open
#778 0 comments 0 reactions 0 assignees View on GitHub

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.

Problem / Motivation

Currently, the Email TOTP method is activated immediately when enabled, without verifying that the configured email address can actually receive authentication codes. This can lead to account lockouts or failed logins if the email delivery is misconfigured, blocked, or incorrect.

In contrast, the app-based TOTP flow already includes an explicit verification step: users must scan the QR code and enter a generated token before the method becomes active. This aims to improve UX consistency between Email TOTP and app-based TOTP.

This proposed solution has been discussed in the Two-Factor Chat on Slack at 4th of February. See more here.

Proposed Solution

Change the Email TOTP activation flow so that it is only activated after successful verification, i.e. after the user has received and entered at least one verification code.

Suggested behavior:

  1. User goes /wp-admin/profile.php
  2. Email TOTP is not yet active.
  3. User must click “Verify your e-mail adress"
  4. User receives the code over email
  5. User enteres it on the edit profile page
  6. After successful verification Email TOTP is activated.

Backwards Compatibility
We need to make sure there is no impact on existing verified email totp setups.

Designs

The example below serves as draft to see how this potentially could look like
Image

Describe alternatives you've considered

stick to current version

Please confirm that you have searched existing issues in this repository.

Yes

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Email TOTP activation flow reached from /wp-admin/profile.php and trace how enabling the method currently makes it active. Implement the proposed verification step while preserving existing verified setups, then confirm that activation occurs only after a code is entered successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
authentication, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.