import type { Metadata } from "next"; import { startTwoFactorSetupAction } from "@/app/actions/settings"; import { BRAND } from "@/components/brand"; import { LockIcon } from "@/components/icons"; import { SettingsRow, SettingsSection } from "@/components/metal"; import { QrCode } from "@/components/qr-code"; import { PlateBody, PlateFooter, PlateSection } from "@/components/settings-plate"; import { Button, Label, PageTitle } from "@/components/ui"; import { requireViewer } from "@/lib/auth"; import { formatDate } from "@/lib/format"; import { groupSecret, otpauthUri } from "@/lib/totp"; import { twoFactorStatus } from "@/lib/two-factor"; import { DisableTwoFactorForm, EnableTwoFactorForm, RegenerateRecoveryCodesForm } from "./forms"; export const metadata: Metadata = { title: "Two-factor authentication" }; export default async function SecuritySettingsPage() { const viewer = await requireViewer("/settings/security"); const status = await twoFactorStatus(viewer.id); return (