From 342ed96b6c956a7bcb50e5a19265513bbc491575 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Sat, 1 Apr 2023 21:04:15 -0700 Subject: [PATCH] fix: :passport_control: no longer need 2fa for webauthn --- .../src/server/api/endpoints/i/2fa/register-key.ts | 6 +++--- packages/client/src/components/MkDialog.vue | 1 + packages/client/src/pages/settings/2fa.vue | 8 +++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts b/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts index 8c0af28ee4..96239b56de 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts @@ -32,9 +32,9 @@ export default define(meta, paramDef, async (ps, user) => { throw new Error("incorrect password"); } - if (!profile.twoFactorEnabled) { - throw new Error("2fa not enabled"); - } + // if (!profile.twoFactorEnabled) { + // throw new Error("2fa not enabled"); + // } // 32 byte challenge const entropy = await randomBytes(32); diff --git a/packages/client/src/components/MkDialog.vue b/packages/client/src/components/MkDialog.vue index 5d5ca1e8d2..708db22efe 100644 --- a/packages/client/src/components/MkDialog.vue +++ b/packages/client/src/components/MkDialog.vue @@ -13,6 +13,7 @@
+
diff --git a/packages/client/src/pages/settings/2fa.vue b/packages/client/src/pages/settings/2fa.vue index 71a76c7164..bb3862b4bd 100644 --- a/packages/client/src/pages/settings/2fa.vue +++ b/packages/client/src/pages/settings/2fa.vue @@ -4,7 +4,9 @@ +