From c8086403dbc20442ad1f91d313f1c481c7a68580 Mon Sep 17 00:00:00 2001 From: "Rudy B." Date: Sat, 25 Apr 2026 18:16:49 +0200 Subject: [PATCH] chore: add comment about `manualKey` --- src/app/api/2fa/setup/initiate/route.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/api/2fa/setup/initiate/route.ts b/src/app/api/2fa/setup/initiate/route.ts index d55c2f7e6..43a83f191 100644 --- a/src/app/api/2fa/setup/initiate/route.ts +++ b/src/app/api/2fa/setup/initiate/route.ts @@ -34,5 +34,9 @@ export async function POST(request: Request) { create: { userId, secret: encryptedSecret, isEnabled: false }, }); + /* + `manualKey` is intentionally plaintext as the user needs it once for manual entry. + The encrypted copy in DB is what matters for long-term storage. + */ return json({ qrCodeDataUrl, manualKey: secret }); }