fix(web): collect TOTP code in disable-2FA form (BUNYIP-212) #229
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/bunyip-212-disable-2fa-totp-code"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The sensitive-op re-prompt added in BUNYIP-138 makes the API require a fresh TOTP/recovery code (in addition to the password) before turning 2FA off, but the bunyip-web disable-2FA form was never updated to collect one, so a subscriber with 2FA enabled could never disable it from the UI.
Thread totp_code through the disable path, mirroring the sibling change-password / change-email / delete-account forms: add a required Two-Factor Code input to the disable-2FA form (it only renders when 2FA is on, so the code is always needed), add totp_code to DisableForm, forward it from settings_disable_2fa, and have auth_api::disable_2fa POST { password, totp_code } (empty-skip when blank). No API change; a missing or invalid code still surfaces via the existing /settings redirect-error path.
#BUNYIP-212
The sensitive-op re-prompt added in BUNYIP-138 makes the API require a fresh TOTP/recovery code (in addition to the password) before turning 2FA off, but the bunyip-web disable-2FA form was never updated to collect one, so a subscriber with 2FA enabled could never disable it from the UI. Thread totp_code through the disable path, mirroring the sibling change-password / change-email / delete-account forms: add a required Two-Factor Code input to the disable-2FA form (it only renders when 2FA is on, so the code is always needed), add totp_code to DisableForm, forward it from settings_disable_2fa, and have auth_api::disable_2fa POST { password, totp_code } (empty-skip when blank). No API change; a missing or invalid code still surfaces via the existing /settings redirect-error path. #BUNYIP-212