From aeba95a8b536df83dfb2dab2a0edaf361ad3d7b0 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 8c0af28ee..96239b56d 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 5d5ca1e8d..708db22ef 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 71a76c716..bb3862b4b 100644 --- a/packages/client/src/pages/settings/2fa.vue +++ b/packages/client/src/pages/settings/2fa.vue @@ -4,7 +4,9 @@ +