Files
supabase/apps/studio/components/interfaces/Auth
Joshen Lim 7c52a9b539 Joshenlim/fe 3931 re phone mfa enrollment repeatedly force disabled despite (#52629)
## Context

In Authentication -> Multi Factor, if you've set SMS MFA to any status
apart from "Disabled" and refresh the page, the UI seemingly doesn't
render the right value in the dropdown as such:
<img width="1114" height="160" alt="image"
src="https://github.com/user-attachments/assets/d3353628-0b9a-4347-b81f-3a968a87b5c2"
/>

Was happening as the form mounted with placeholder values (for SMS MFA,
default status was "Disabled"), and the real value was only applied
afterwards by a `useEffect` which called `reset`. This changed the
`Select`'s value after mount, in Radix then fires an event on that
change through `onValueChange` which set `value` as an empty string
`''`. It happens as well for TOTP, if you set any value other than
"Enabled" which is the default status.

## Changes involved
- Am also opting to breakdown `MfaAuthSettingsForm.tsx` into smaller
components as it's a single file handling 3 different forms at the
moment
- (Main fix) Derive the form values via `defaultValue` instead of via
`useEffect` which prevents the unintended firing of `onValueChange` for
the `Select`
2026-11-03 14:38:39 +08:00
..
2026-07-01 08:24:17 -06:00