## 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>
## Problem
Account checks need consistent query gating and recovery-gap evaluation.
Sign-in and sign-out already reset the query cache; user-scoped keys add
defence in depth.
## Solution
Tie account query caches to the signed-in person, honour query gating,
and centralise recovery-gap evaluation. No layout changes.
## Review instructions
1. Open [Account
Security](https://studio-staging-git-dnywh-recovery-account-queries-supabase.vercel.app/dashboard/account/security)
in staging, or `/account/security` locally. Sign in with a test account
that has MFA enabled; confirm its authenticators and recovery-code
status load normally.
2. Sign out and sign in as a different test account with a different MFA
setup. Confirm the page shows that account’s setup, without the previous
account’s authenticators or code status.
3. Reload with MFA enabled and complete the sign-in challenge. Account
Security should load normally after verification.
* Move all studio files from /studio to /apps/studio.
* Move studio specific prettier ignores.
* Fix the ui references from studio.
* Fix the css imports.
* Fix all package.json issues.
* Fix the prettier setup for the studio app.
* Add .turbo folder to prettierignore.
* Fix the github workflows.