mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## Problem Authenticator removal can fail when the session has not completed MFA. This is difficult to test (see below) but shows an awkward toast with unclear “AAL1” and ”AAL2” copy, which is unhelpful to the user. ## Solution Checks the session before removal confirmation. If needed, shows _Verify your identity_ first. Depends on #52351. Badge presentation: #52748. Recovery-code verification: #52747. | After | | --- | | <img width="814" height="725" alt="Security Account Supabase" src="https://github.com/user-attachments/assets/8d0dc002-3777-4ba5-a4bc-9d98a059c2c4" /> | | _Unfilled state._ | | <img width="814" height="725" alt="63727" src="https://github.com/user-attachments/assets/5472de19-99b6-4403-aaca-f92e319445cb" /> | | _Errored state._ | | <img width="814" height="725" alt="27157" src="https://github.com/user-attachments/assets/f8480f0b-5cc4-432f-b38f-79cd311274cf" /> | | _What the above (success state) unlocks: being able to remove authenticator._ | ## Review instructions Use a disposable MFA account and sign in normally. 1. Open [Security locally](http://localhost:8082/account/security) (so the breakpoint feature can be used). Click Delete beside an authenticator. Since you already entered an MFA code at sign-in, removal confirmation should open directly. Cancel keeps the authenticator. Click Cancel. 2. To show verification, open DevTools → Sources → ⌘P. Find `mfa-authenticator-assurance-level-query.ts`. Inside `getMfaAuthenticatorAssuranceLevel`, click the line number beside **`return data`** to add a breakpoint, then (back in the Studio interface) click Delete. 3. When Paused in debugger appears, press Esc for the Console drawer (in DevTools) and run `data.currentLevel = 'aal1'`. Remove the breakpoint by clicking its line number again, then press F8 or Resume ▶ (at the top of Studio in the yellow strip). 4. Try an invalid authenticator code, then a valid one. Verification must lead to a separate removal confirmation. Cancel must keep the authenticator. --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>