enhance: 二要素認証設定時のセキュリティを強化 (#11863)

* enhance: 二要素認証設定時のセキュリティを強化

パスワード入力が必要な操作を行う際、二要素認証が有効であれば確認コードの入力も必要にする

* Update CoreModule.ts

* Update 2fa.ts

* wip

* wip

* Update 2fa.ts

* tweak
This commit is contained in:
syuilo
2023-09-22 14:12:33 +09:00
committed by GitHub
parent eca8c7a52f
commit c836157edb
23 changed files with 400 additions and 122 deletions

View File

@@ -113,14 +113,12 @@ async function deleteAccount() {
if (canceled) return;
}
const { canceled, result: password } = await os.inputText({
title: i18n.ts.password,
type: 'password',
});
if (canceled) return;
const auth = await os.authenticateDialog();
if (auth.canceled) return;
await os.apiWithDialog('i/delete-account', {
password: password,
password: auth.result.password,
token: auth.result.token,
});
await os.alert({