mirror of
https://github.com/supabase/supabase.git
synced 2026-12-05 07:59:03 +00:00
## Problem The same recovery setup needs to work from Account Security and the new recovery interstitial without duplicating dialog behaviour. ## Solution Share the generation and regeneration flow, and report completion only after codes are acknowledged or an authenticator is verified. Keep the existing Account Security entry points. This PR provides the dialog foundation; #52122 and #52123 consume its callbacks, and #51643 mounts the takeover. ## Review instructions 1. Open [Account Security](https://studio-staging-git-dnywh-recovery-shared-dialogs-supabase.vercel.app/dashboard/account/security) in staging, or `/account/security` locally, using a disposable test account. 2. Generate recovery codes. Confirm Done stays disabled until the save acknowledgement is checked, then closes the dialog. 3. Regenerate codes. Cancel the confirmation first and confirm nothing changes; repeat and confirm the replacement codes appear. 4. Open Add authenticator and cancel. Then complete enrolment with a test authenticator; confirm it appears only after verification. --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>