Commit Graph
3 Commits
Author SHA1 Message Date
Danny White 797a43c7d0 feat(studio): add a shared shield badge to identity verification (#53145)
## Problem

The authenticator and recovery-code verification screens use the plain
Supabase logo, while other security interstitials use a badge to show
the purpose of the screen.

## Solution

Add the same shield with a cut-out check to **Verify your identity** and
**Use a recovery code**, using `InterstitialLogoBadge`.

| After |
| --- |
| <img width="942" height="456" alt="CleanShot 2026-11-09 at 18 02
09@2x"
src="https://github.com/user-attachments/assets/6e19eb79-7b42-4f95-967d-479ca38cc347"
/> |
| _Note the grey “Shield with cut-out check” for verification
interstitials like this one._ |
| <img width="1016" height="454" alt="CleanShot 2026-11-09 at 10 35
46@2x"
src="https://github.com/user-attachments/assets/dca51146-c7ee-44fd-a318-ef7101f1c77f"
/> |
| _No visual changes here, just showing the family of badges._ |

## Review instructions

1. On [Security on this
preview](https://studio-staging-git-dnywh-verification-shield-badge-supabase.vercel.app/dashboard/account/security),
follow [#52352’s breakpoint
steps](https://github.com/supabase/supabase/pull/52352#review-instructions)
with a disposable MFA account that has recovery codes. Check for the
shield in the top-right corner of the Supabase logo.
2. Choose **Use recovery code instead**. Check that the same badge
appears on the recovery-code screen.
2026-11-10 16:15:26 +11:00
Danny WhiteandJoshen Lim c7b49e2b1b feat(studio): resume account actions after recovery-code verification (#52747)
## Problem

Recovery-code verification uses a separate sign-in layout and returns
users to Security without resuming the selected action.

## Solution

Visually align with other security checks: use InterstitialLayout and
return to the selected authenticator’s removal confirmation. Cancel
returns to Security without signing out. Verification never removes the
authenticator automatically.

| Before | After |
| --- | --- |
| <img width="1280" height="1323" alt="Supabase"
src="https://github.com/user-attachments/assets/404e7b6d-6fe6-492a-b853-dc3b13b8f767"
/> | <img width="1280" height="1323" alt="47214"
src="https://github.com/user-attachments/assets/0100cf2f-3252-4f5c-a3a6-17bb0d81dfa5"
/> |

| After |
| --- |
| <img width="1280" height="1323" alt="45032"
src="https://github.com/user-attachments/assets/584254e2-0772-4dae-a0e5-9be6a8f99239"
/> |
| _Loading state._ |
| <img width="1280" height="1323" alt="8565"
src="https://github.com/user-attachments/assets/6d14459d-f172-4338-a021-fb5721649fda"
/> |
| _Standard unfilled state._ |
| <img width="1280" height="1323" alt="47304"
src="https://github.com/user-attachments/assets/83eca080-0fb6-4b3e-a52b-0110c6f8714a"
/> |
| _Error state. I’ve removed `font-mono` since this screenshot._ |

This PR also includes the _Use recovery code instead_ option into the
prior PR’s _Verify your identity_ interstitial:

| After |
| --- |
| <img width="1280" height="763" alt="6526"
src="https://github.com/user-attachments/assets/a05e3bc5-061d-4297-9fd0-e456dba44d4a"
/> |
| _Addition of the _Use recovery code instead_ button._ |


## Review instructions

Use a disposable MFA account with saved recovery codes. Successful
verification consumes one code.

1. Open [Security on this
preview](https://studio-staging-git-dnywh-recovery-code-verification-supabase.vercel.app/dashboard/account/security).
Follow [#52352’s breakpoint
steps](https://github.com/supabase/supabase/pull/52352#review-instructions)
on this preview to show Verify your identity. Remove the breakpoint
before continuing.
2. Choose Use a recovery code instead. Check the code visibility control
and an invalid-code error, then enter a valid saved code. The selected
authenticator’s removal confirmation should open. Nothing is deleted
until you click Remove.
3. Repeat and Cancel on the recovery-code screen. Return to Security and
remain signed in.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-11-09 16:35:32 +11:00
Danny WhiteandJoshen Lim 1052d414ad fix(studio): verify identity before removing authenticators (#52352)
## 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>
2026-11-09 16:35:31 +11:00