Tài liệu
EmailMfaV2
EmailMfaV2
6 endpoint trong nhóm này.
GET
MFA Status
/api/email_mfa_v2/status/{user_type}/{user_id}
Read-only summary: enrollment flag + active codes count (total + per-purpose)
POST
Send Code
/api/email_mfa_v2/send
Issue and email a new one-time code to the target user
POST
Verify Code
/api/email_mfa_v2/verify
Verify a one-time code submitted by the user. Returns 200 on success, 401 on invalid/expired.
GET
List Active Codes
/api/email_mfa_v2/list/{user_type}/{user_id}
List active codes for the target user. Returns only an 8-char hash_prefix — never the full SHA-256 hash, never plaintext.
POST
Revoke All Codes
/api/email_mfa_v2/revokeall
Revoke all active codes for the target user. Enrollment is kept; the user can still log in via MFA but with no pre-existing valid codes.
POST
Disable MFA
/api/email_mfa_v2/disable
Disable MFA entirely for the target user (drops enrollment row + purges all active codes + invalidates cache).