From 96f82444a7c674746b9d1dabdc9ae7a05cf394ce Mon Sep 17 00:00:00 2001 From: Karli Date: Wed, 10 Sep 2025 07:12:05 +0300 Subject: [PATCH] show 2fa secret as text also (example: adding to bitwarden) --- .../mfa/multi-factor-auth-setup-dialog.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/features/accounts/src/components/personal-account-settings/mfa/multi-factor-auth-setup-dialog.tsx b/packages/features/accounts/src/components/personal-account-settings/mfa/multi-factor-auth-setup-dialog.tsx index 56ef8d7..b485d95 100644 --- a/packages/features/accounts/src/components/personal-account-settings/mfa/multi-factor-auth-setup-dialog.tsx +++ b/packages/features/accounts/src/components/personal-account-settings/mfa/multi-factor-auth-setup-dialog.tsx @@ -265,11 +265,13 @@ function FactorQrCode({ z.object({ factorName: z.string().min(1), qrCode: z.string().min(1), + totpSecret: z.string().min(1), }), ), defaultValues: { factorName: '', qrCode: '', + totpSecret: '', }, }); @@ -319,6 +321,7 @@ function FactorQrCode({ if (data.type === 'totp') { form.setValue('factorName', name); form.setValue('qrCode', data.totp.qr_code); + form.setValue('totpSecret', data.totp.secret); } // dispatch event to set factor ID @@ -343,6 +346,10 @@ function FactorQrCode({
+ +

+ {form.getValues('totpSecret')} +

); }