## Problem
- Sign-in methods are in Preferences, separate from MFA and recovery
settings.
- The risk of a single sign-in method (e.g. GitHub, and getting locked
out of that account) isn’t clearly communicated.
## Solution
- Bring sign-in methods, MFA and recovery codes together on the Security
page. If Security is disabled, sign-in methods remain accessible in
Preferences.
- Highlight the most important next step with a primary button. For
example, when MFA is off, “Set up MFA” takes priority over adding a
password.
- Explain the risk of relying on a single sign-in provider, and make it
clear which email address a new password will apply to.
- After connecting a sign-in provider, return users to the settings page
they can access. Links to password setup open the password dialog
directly.
| After |
| --- |
| <img width="1460" height="1426" alt="CleanShot 2026-11-06 at 14 54
23@2x"
src="https://github.com/user-attachments/assets/afb82601-1b6f-43be-9e98-a0edb8d529c8"
/> |
| _The “Sign-in methods” section moved to Account → Security. Note also
the new Admonition regarding the risk of a single (GitHub) sign-in
method._ |
## Review instructions
1. Open
[Security](https://studio-staging-git-dnywh-recovery-security-home-supabase.vercel.app/dashboard/account/security#sign-in-methods).
Check sign-in methods appear above MFA and recovery codes. With MFA off,
“Set up MFA” should be primary.
2. Open Preferences. Sign-in methods should be absent unless Security is
disabled.
3. On a test account, check password setup, email editing and provider
linking. [Open password setup
directly](https://studio-staging-git-dnywh-recovery-security-home-supabase.vercel.app/dashboard/account/security?securityAction=set-password#sign-in-methods),
then cancel and confirm it stays closed.
## Problem
Users with serious recovery gaps may never visit Account Security, so a
manually accessible reminder is easy to miss.
## Solution
Show the existing reminder as a full-screen layout takeover after
required MFA verification and successful account reads. Keep the
original URL, query and fragment intact. The dashboard stays mounted but
inert, preserving unsaved work; dismissal reveals it. Wait for existing
dialogs to close. Keep rollout gating, eligibility and snooze unchanged.
A successfully resolved background check dismisses an untouched
takeover; started tasks and completed rows remain until Continue.
Both of these recovery flags are enabled via ConfigCat for local and
staging:
- `enableAccountRecoveryInterstitial`: this work
- `enableAuthRecoveryCodes`: the work it depends on
We’ll only flip these to `true` for production once all of this is
merged and heavily tested.
| Interruption Example |
| --- |
| <img width="654" height="800" alt="16563"
src="https://github.com/user-attachments/assets/eec71acf-78ab-473d-a9d3-9c6cdc3aff07"
/> |
The dashboard remains usable while eligibility loads. An open takeover
stays in place through background refreshes. Signing out clears
in-memory reminder state so clearing browser snooze permits retesting.
## Review instructions
1. Open [this PR’s staging
preview](https://studio-staging-git-dnywh-account-recovery-interstitial-supabase.vercel.app/dashboard/organizations)
with a non-SSO test account and complete required MFA verification.
Check `enableAccountRecoveryInterstitial` and `enableAuthRecoveryCodes`
are both true in the staging dev toolbar. Close the toolbar and other
dialogs.
2. **Exhausted codes:** use an account with existing codes and exactly
one verified authenticator. Override GET `/factors/recovery-codes` in
DevTools Network: retain JSON fields, set `remaining` to `0` and save.
Clear `account-recovery-reminder:<userId>` from Local Storage for this
preview origin, then reload. Make sure you are **not** on
`dashboard/account/security` as that won’t show the interstitial.
Confirm the request uses the override and the takeover opens without
changing the URL.
3. **Missing codes, separate scenario:** disable overrides and use an
MFA test account with no generated codes. Clear snooze and reload. A
zero remaining count simulates exhausted codes, not missing codes. A
second verified authenticator prevents the exhausted-code trigger, but
not the missing-code trigger.
4. Skip, reload and switch projects or organisations. Confirm snooze
persists. A different account must have separate reminder state. For
warning-to-critical escalation, generate codes on the missing-code
account, then override its remaining count to zero and reload without
clearing the warning snooze.
5. Disable overrides before live actions. Save codes or add an
authenticator, then Continue. Confirm the page and URL remain intact.
Tab and Command/Ctrl+K must not reach dashboard controls; nested dialogs
must still work. Editor draft and browser-history preservation are also
covered by component tests.
6. With snooze cleared, open a project URL containing a query and
fragment; opening and dismissing the takeover must leave that full URL
unchanged. Check account settings, sign-in, MFA verification and
consent/connection flows remain uninterrupted. A healthy account, failed
reads or a disabled rollout flag must not trigger a takeover.
7. Throttle the status request: the dashboard stays usable while
eligibility loads. If another dialog is already open, the takeover waits
until it closes. There is no standalone recovery route or runtime mock
parameter.