Browse Source

cli: reset 2fa on admin reset (#2461)

reset 2fa on cli reset
pull/2466/head
Bernd Storath 4 months ago
committed by GitHub
parent
commit
c5de8f0f44
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      src/cli/index.ts

4
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));

Loading…
Cancel
Save