import { toast } from "sonner"; import { Button } from "~/client/components/ui/button"; import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "~/client/components/ui/dialog"; import { copyToClipboard } from "~/utils/clipboard"; const RESET_2FA_COMMAND = "docker exec -it zerobyte bun run cli 2fa disable -u "; type Reset2faDialogProps = { open: boolean; onOpenChange: (open: boolean) => void; }; export const Reset2faDialog = ({ open, onOpenChange }: Reset2faDialogProps) => { const handleCopy = async () => { await copyToClipboard(RESET_2FA_COMMAND); toast.success("Command copied to clipboard"); }; return ( Reset Two-Factor Authentication Lost access to your authenticator app? Run the following command on the server where Zerobyte is installed to disable 2FA for your account.
{RESET_2FA_COMMAND}

Replace <username> with your actual username. After running this command, you'll be able to log in without 2FA and can set it up again from settings.

); };