feat: refactor TOTP code handling to improve state management and refresh logic

This commit is contained in:
shuaiplus
2026-04-25 01:48:20 +08:00
parent fccc85c4bb
commit 514889adfc
3 changed files with 48 additions and 13 deletions
@@ -131,7 +131,6 @@ export default function useAccountSecurityActions(options: UseAccountSecurityAct
try {
const derived = await deriveLoginHash(profile.email, disableTotpPassword, defaultKdfIterations);
await setTotp(authedFetch, { enabled: false, masterPasswordHash: derived.hash });
if (profile.id) localStorage.removeItem(`nodewarden.totp.secret.${profile.id}`);
clearDisableTotpDialog();
await refetchTotpStatus();
onNotify('success', t('txt_totp_disabled'));