mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## 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.
4 lines
123 B
TypeScript
4 lines
123 B
TypeScript
export const recoveryCodeKeys = {
|
|
status: (userId?: string) => ['recovery-code-status-query', userId].filter(Boolean),
|
|
}
|