From c5de8f0f44182979c37b17e07c05049cce61e570 Mon Sep 17 00:00:00 2001 From: Bernd Storath <32197462+kaaax0815@users.noreply.github.com> Date: Fri, 6 Feb 2026 12:28:13 +0100 Subject: [PATCH] cli: reset 2fa on admin reset (#2461) reset 2fa on cli reset --- src/cli/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cli/index.ts b/src/cli/index.ts index 18c2cbd4..a3d2da04 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -18,7 +18,7 @@ const db = drizzle({ client, schema }); const dbAdminReset = defineCommand({ meta: { name: 'db:admin:reset', - description: 'Reset the admin user', + description: 'Reset the admin user password and TOTP settings', }, args: { password: { @@ -61,6 +61,8 @@ const dbAdminReset = defineCommand({ .update(schema.user) .set({ password: hash, + totpVerified: false, + totpKey: null, }) .where(eq(schema.user.id, 1));