mirror of
https://github.com/supabase/supabase.git
synced 2026-12-05 16:09:06 +00:00
## Problem Initial MFA setup ends without offering a second authenticator as a backup. ## Solution After initial MFA setup and saving codes, offer another authenticator without interrupting existing completion callbacks. | After | | --- | | <img width="1024" height="759" alt="56157" src="https://github.com/user-attachments/assets/81809970-2a50-425f-b4bb-792790ed8047" /> | | _The dialog that appears on step 2 below if first MFA method._ | ## Review instructions 1. Open [Security](https://studio-staging-git-dnywh-recovery-backup-offer-supabase.vercel.app/dashboard/account/security) with a disposable account without MFA. Set up MFA and save the recovery codes. 2. Choose “Add another method” to start backup setup, or “Not now” to finish. Adding a backup must not generate recovery codes again. --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Writing components
Where to create your components
- For components that declare the general structure and layout of a page:
/components/layouts/xxx
- For components that are tightly coupled to a specific interface:
/components/interfaces/xxx
- For components that are meant to be reusable across multiple pages:
/components/ui/xxx
- Note: We're gradually moving files out of the
to-be-cleanedfolder into the respective folders as we refactor
Component structure
- If a component has constants and utility methods that are tightly coupled to itself, keep them close to the component and enclose them in a folder with an
index.tsxas an entry point - Otherwise it can just be a file on its own
- For example:
-
components/ui - SampleComponentA - SampleComponentA.tsx - SampleComponentA.constants.ts - SampleComponentA.utils.ts - SampleComponentA.types.ts - index.ts - SampleComponentB.tsx
-
Template for building components
// Declare the prop types of your component
interface ComponentAProps {
sampleProp: string
}
// Name your component accordingly — use a named export, not a default export
export const ComponentA = ({ sampleProp }: ComponentAProps) => {
return <div>ComponentA: {sampleProp}</div>
}