Repository navigation
Conversation
- Mfa\RestApi: GET /users/{id}/mfa (owner or edit_user), POST
/mfa/enroll and /mfa/confirm, DELETE /mfa/factors/{id} with a current
code from the factor; wp_rest cookie auth; per-user rate limits;
filters workos_mfa_can_manage and workos_mfa_can_manage_user
- Account panel (React, wp-element): profile.php section and the
[workos:mfa] shortcode
- The profile-scoped /auth/mfa/factors|totp/enroll|factor/delete routes
go through FactorService (confirm step, code to delete)
bordoni
force-pushed
the
feat/mfa-self-service
branch
from
October 18, 2026 17:24
9adff18 to
f7fa19e
Compare
bordoni
marked this pull request as ready for review
October 19, 2026 05:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Users can turn two-step verification on and off themselves. Stacked on #88. Part of #28.
Changes
profile.php, and a[workos:mfa]shortcode for front-end account pages.wp_restnonce, so any UI can use them):GET /users/{id}/mfa: the owner, or anyone withedit_user.POST /users/{id}/mfa/enrollandPOST /users/{id}/mfa/confirm.DELETE /users/{id}/mfa/factors/{factor_id}, with a currentcode.workos_mfa_can_manageandworkos_mfa_can_manage_user./auth/mfa/factors,/totp/enroll,/factor/delete) now go through the same service. Enrollment needs the confirm step, and delete needscode. Nothing in the plugin called them, and they couldn't have worked against WorkOS before fix(mfa): read WorkOS MFA errors, call the real MFA endpoints, stop the password fallback skipping MFA #85.Screenshots
Verified
MfaAccountRestTest(10 tests):AuthKitRestMfaTestupdated for the delete contract, plus a new test that delete without a code is refused.tscand build pass.