enhance: 二要素認証設定時のセキュリティを強化 (#11863)
* enhance: 二要素認証設定時のセキュリティを強化 パスワード入力が必要な操作を行う際、二要素認証が有効であれば確認コードの入力も必要にする * Update CoreModule.ts * Update 2fa.ts * wip * wip * Update 2fa.ts * tweak
This commit is contained in:
		@@ -67,18 +67,16 @@ const onChangeReceiveAnnouncementEmail = (v) => {
 | 
			
		||||
	});
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const saveEmailAddress = () => {
 | 
			
		||||
	os.inputText({
 | 
			
		||||
		title: i18n.ts.password,
 | 
			
		||||
		type: 'password',
 | 
			
		||||
	}).then(({ canceled, result: password }) => {
 | 
			
		||||
		if (canceled) return;
 | 
			
		||||
		os.apiWithDialog('i/update-email', {
 | 
			
		||||
			password: password,
 | 
			
		||||
			email: emailAddress.value,
 | 
			
		||||
		});
 | 
			
		||||
async function saveEmailAddress() {
 | 
			
		||||
	const auth = await os.authenticateDialog();
 | 
			
		||||
	if (auth.canceled) return;
 | 
			
		||||
 | 
			
		||||
	os.apiWithDialog('i/update-email', {
 | 
			
		||||
		password: auth.result.password,
 | 
			
		||||
		token: auth.result.token,
 | 
			
		||||
		email: emailAddress.value,
 | 
			
		||||
	});
 | 
			
		||||
};
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const emailNotification_mention = ref($i!.emailNotificationTypes.includes('mention'));
 | 
			
		||||
const emailNotification_reply = ref($i!.emailNotificationTypes.includes('reply'));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user