Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
refactor(mfa): merge MFA page into Password & Auth, split out TOTP module
Elian Doran372d7823a7aa
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex f1cbc0a1f9..97c5128f5b 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -1692,15 +1692,7 @@"password_changed_success": "Password has been changed. Trilium will be reloaded after you press OK."},"multi_factor_authentication": {- "title": "Multi-Factor Authentication",- "status_active": "Active",- "status_inactive": "Inactive",- "status_active_tooltip": "Multi-Factor Authentication is enabled for your account.",- "status_inactive_tooltip": "Multi-Factor Authentication is currently disabled.",- "description": "Multi-Factor Authentication (MFA) adds an extra layer of security to your account. Instead of just entering a password to log in, MFA requires you to provide one or more additional pieces of evidence to verify your identity. This way, even if someone gets hold of your password, they still can't access your account without the second piece of information. It's like adding an extra lock to your door, making it much harder for anyone else to break in.<br><br>Please follow the instructions below to enable MFA. If you don't config correctly, login will fall back to password only.",- "mfa_enabled": "Enable Multi-Factor Authentication","mfa_method": "MFA Method",- "electron_disabled": "Multi-Factor Authentication is not supported in the desktop build currently.","totp_title": "Time-based One-Time Password (TOTP)","totp_description": "TOTP (Time-Based One-Time Password) is a security feature that generates a unique, temporary code which changes every 30 seconds. You use this code, along with your password to log into your account, making it much harder for anyone else to access it.","totp_setup_label": "Set up two-factor authentication",diff --git a/apps/client/src/widgets/type_widgets/ContentWidget.tsx b/apps/client/src/widgets/type_widgets/ContentWidget.tsxindex a5369de454..4ff5992a62 100644--- a/apps/client/src/widgets/type_widgets/ContentWidget.tsx+++ b/apps/client/src/widgets/type_widgets/ContentWidget.tsx@@ -7,7 +7,6 @@ import CodeNoteSettings from "./options/code_notes";import MediaSettings from "./options/media";import SpellcheckSettings from "./options/spellcheck";import PasswordSettings from "./options/password";-import MultiFactorAuthenticationSettings from "./options/multi_factor_authentication";import EtapiSettings from "./options/etapi";import BackupSettings from "./options/backup";import SyncOptions from "./options/sync";@@ -21,7 +20,7 @@ import "./ContentWidget.css";import { t } from "../../services/i18n";import BackendLog from "./code/BackendLog";-export type OptionPages = "_optionsAppearance" | "_optionsShortcuts" | "_optionsTextNotes" | "_optionsCodeNotes" | "_optionsMedia" | "_optionsSpellcheck" | "_optionsPassword" | "_optionsMFA" | "_optionsEtapi" | "_optionsBackup" | "_optionsSync" | "_optionsDesktop" | "_optionsOther" | "_optionsLocalization" | "_optionsSecurity" | "_optionsAdvanced" | "_optionsLlm";+export type OptionPages = "_optionsAppearance" | "_optionsShortcuts" | "_optionsTextNotes" | "_optionsCodeNotes" | "_optionsMedia" | "_optionsSpellcheck" | "_optionsPassword" | "_optionsEtapi" | "_optionsBackup" | "_optionsSync" | "_optionsDesktop" | "_optionsOther" | "_optionsLocalization" | "_optionsSecurity" | "_optionsAdvanced" | "_optionsLlm";const CONTENT_WIDGETS: Record<OptionPages | "_backendLog", (props: TypeWidgetProps) => JSX.Element> = {_optionsAppearance: AppearanceSettings,@@ -31,7 +30,6 @@ const CONTENT_WIDGETS: Record<OptionPages | "_backendLog", (props: TypeWidgetPro_optionsMedia: MediaSettings,_optionsSpellcheck: SpellcheckSettings,_optionsPassword: PasswordSettings,- _optionsMFA: MultiFactorAuthenticationSettings,_optionsEtapi: EtapiSettings,_optionsBackup: BackupSettings,_optionsSync: SyncOptions,diff --git a/apps/client/src/widgets/type_widgets/options/password.css b/apps/client/src/widgets/type_widgets/options/password.cssnew file mode 100644index 0000000000..ece9b07e9b--- /dev/null+++ b/apps/client/src/widgets/type_widgets/options/password.css@@ -0,0 +1,17 @@+/* OAuth section heading: the title text and its configured/not-configured status badge on one line,+ the badge sitting just after the title. */+.oauth-status-title {+ display: inline-flex;+ align-items: center;+ gap: 10px;+}++/* Status badge mirrors the page-header MFA badge: a colored outline whose hue is driven by --color+ (green when configured, muted otherwise). */+.oauth-status-badge.configured {+ --color: var(--admonition-tip-accent-color, #40c025);+}++.oauth-status-badge.not-configured {+ --color: var(--muted-text-color, #888);+}diff --git a/apps/client/src/widgets/type_widgets/options/password.tsx b/apps/client/src/widgets/type_widgets/options/password.tsxindex a631e6a5e0..d39bb28be0 100644--- a/apps/client/src/widgets/type_widgets/options/password.tsx+++ b/apps/client/src/widgets/type_widgets/options/password.tsx@@ -1,25 +1,40 @@-import { useState } from "preact/hooks";+import "./password.css";++import { ChangePasswordResponse, OAuthStatus, TOTPStatus } from "@triliumnext/commons";import { createPortal } from "preact/compat";+import { useCallback, useEffect, useState } from "preact/hooks";++import dialog from "../../../services/dialog";import { t } from "../../../services/i18n";+import protected_session_holder from "../../../services/protected_session_holder";import server from "../../../services/server";import toast from "../../../services/toast";+import { isElectron } from "../../../services/utils";+import Admonition from "../../react/Admonition";+import { Badge } from "../../react/Badge";import Button from "../../react/Button";+import Collapsible from "../../react/Collapsible";import FormGroup from "../../react/FormGroup";+import { FormInlineRadioGroup } from "../../react/FormRadioGroup";+import FormText from "../../react/FormText";import FormTextBox from "../../react/FormTextBox";+import { useTriliumOption } from "../../react/hooks";+import Modal from "../../react/Modal";+import RawHtml from "../../react/RawHtml";import OptionsPageHeader from "./components/OptionsPageHeader";-import OptionsSection from "./components/OptionsSection";import OptionsRow, { OptionsRowWithButton } from "./components/OptionsRow";-import protected_session_holder from "../../../services/protected_session_holder";-import { ChangePasswordResponse } from "@triliumnext/commons";-import dialog from "../../../services/dialog";+import OptionsSection from "./components/OptionsSection";import TimeSelector from "./components/TimeSelector";-import Modal from "../../react/Modal";+import { TotpSettings } from "./totp";export default function PasswordSettings() {return (<><OptionsPageHeader /><ChangePassword />+ {/* Two-factor auth (TOTP) and OAuth are only available on the server build — the desktop+ app authenticates differently — matching the former MFA page's serverOnly scope. */}+ {!isElectron() && <TwoFactorAuthentication />}<ProtectedSessionTimeout /></>);@@ -162,3 +177,129 @@ function ProtectedSessionTimeout() {</OptionsSection>);}++/**+ * Two-factor authentication settings. Owns the live TOTP/OAuth status (the method selector needs+ * `totpStatus.set` to know whether to offer switching methods) and delegates the heavier TOTP UI to+ * its own module; OAuth is small and read-only, so it lives here.+ */+function TwoFactorAuthentication() {+ const [ mfaMethod, setMfaMethod ] = useTriliumOption("mfaMethod");+ const [ totpStatus, setTotpStatus ] = useState<TOTPStatus>();+ const [ oauthStatus, setOauthStatus ] = useState<OAuthStatus>();++ const refreshTotpStatus = useCallback(() => {+ server.get<TOTPStatus>("totp/status").then(setTotpStatus);+ }, []);++ useEffect(() => {+ refreshTotpStatus();+ server.get<OAuthStatus>("oauth/status").then(setOauthStatus);+ }, [ refreshTotpStatus ]);++ // The method selector only matters during initial setup. Switching method once one is configured+ // silently strands the existing setup and can leave MFA effectively off (see the remove flow),+ // so once the current method is set up we hide the selector — removing TOTP (or reconfiguring+ // OAuth server-side) is the way to change method.+ const methodSetUp = mfaMethod === "totp" ? totpStatus?.set : oauthStatus?.enabled;++ return (+ <>+ {!methodSetUp &&+ <OptionsSection className="mfa-options" title={t("multi_factor_authentication.mfa_method")}>+ <FormInlineRadioGroup+ name="mfaMethod"+ currentValue={mfaMethod} onChange={setMfaMethod}+ values={[+ { value: "totp", label: t("multi_factor_authentication.totp_title") },+ { value: "oauth", label: t("multi_factor_authentication.oauth_title") }+ ]}+ />++ <FormText>+ { mfaMethod === "totp"+ ? t("multi_factor_authentication.totp_description")+ : <RawHtml html={t("multi_factor_authentication.oauth_description")} /> }+ </FormText>+ </OptionsSection>}++ { mfaMethod === "totp" &&+ <TotpSettings totpStatus={totpStatus} refreshTotpStatus={refreshTotpStatus} /> }++ {/* OAuth is configured entirely server-side, so its card is read-only and stays visible+ regardless of the active method — it's a status indicator for whether OAuth is available. */}+ <OAuthStatusCard status={oauthStatus} />+ </>+ );+}++/**+ * Read-only OAuth status card. OAuth is configured entirely server-side (env vars / config.ini),+ * so this card offers no controls — it just reflects whether OAuth is available, and when it's the+ * active method, the signed-in account. It stays visible even while TOTP is the active method so the+ * user can always tell whether OAuth is set up.+ */+function OAuthStatusCard({ status }: { status?: OAuthStatus }) {+ // "Configured" is purely about the server-side variables being present, independent of which MFA+ // method is currently active (the server's `enabled` flag additionally requires mfaMethod === 'oauth').+ const configured = (status?.missingVars?.length ?? 1) === 0;++ return (+ <OptionsSection+ title={+ <span className="oauth-status-title">+ {t("multi_factor_authentication.oauth_title")}+ <Badge+ className={`oauth-status-badge ${configured ? "configured" : "not-configured"}`}+ icon={configured ? "bx bx-check" : "bx bx-x"}+ text={configured+ ? t("multi_factor_authentication.oauth_status_configured")+ : t("multi_factor_authentication.oauth_status_not_configured")}+ outline+ />+ </span>+ }+ >+ { configured ? (+ <div class="col-md-6">+ <span><b>{t("multi_factor_authentication.oauth_user_account")}</b></span>+ <span class="user-account-name">{status?.name ?? t("multi_factor_authentication.oauth_user_not_logged_in")}</span>++ <br />+ <span><b>{t("multi_factor_authentication.oauth_user_email")}</b></span>+ <span class="user-account-email">{status?.email ?? t("multi_factor_authentication.oauth_user_not_logged_in")}</span>+ </div>+ ) : (+ <>+ <p>{t("multi_factor_authentication.oauth_not_configured_hint")}</p>++ { status?.missingVars && status.missingVars.length > 0 && (+ <Admonition type="note">+ {t("multi_factor_authentication.oauth_missing_vars", {+ variables: status.missingVars.map(v => `"${v}"`).join(", ")+ })}+ </Admonition>+ )}++ <OAuthConfigHint />+ </>+ )}+ </OptionsSection>+ );+}++/**+ * Collapsible "How to enable" hint for OAuth, mirroring the security page's ServerConfigHint. Lists+ * the config.ini section and the equivalent environment variables the server reads — OAuth has no+ * in-app setup, so this is the only place the values are documented in the UI.+ */+function OAuthConfigHint() {+ return (+ <Collapsible title={t("multi_factor_authentication.oauth_how_to_enable")}>+ <p>{t("multi_factor_authentication.oauth_server_config_hint")}</p>+ <pre><code>{"[MultiFactorAuthentication]\noauthBaseUrl=\noauthClientId=\noauthClientSecret="}</code></pre>+ <p>{t("multi_factor_authentication.oauth_server_env_hint")}</p>+ <pre><code>{"TRILIUM_OAUTH_BASE_URL=\nTRILIUM_OAUTH_CLIENT_ID=\nTRILIUM_OAUTH_CLIENT_SECRET="}</code></pre>+ </Collapsible>+ );+}diff --git a/apps/client/src/widgets/type_widgets/options/multi_factor_authentication.css b/apps/client/src/widgets/type_widgets/options/totp.csssimilarity index 73%rename from apps/client/src/widgets/type_widgets/options/multi_factor_authentication.cssrename to apps/client/src/widgets/type_widgets/options/totp.cssindex dcef53e83d..f01ef43aaa 100644--- a/apps/client/src/widgets/type_widgets/options/multi_factor_authentication.css+++ b/apps/client/src/widgets/type_widgets/options/totp.css@@ -1,43 +1,3 @@-/* Flex row holding the status badge, so the badge sizes to its content instead of stretching to- fill the full header width (the shared actions slot isn't itself a flex container). */-.mfa-header-actions {- display: flex;- align-items: center;-}--/* Status badge on the MFA page header, mirroring the shortcuts page's outline badge: a colored- outline whose hue is driven by the --color variable (green when active, muted when inactive). */-.mfa-status-badge {- flex: 0 0 auto;- margin-inline-end: auto;-}--.mfa-status-badge.active {- --color: var(--admonition-tip-accent-color, #40c025);-}--.mfa-status-badge.inactive {- --color: var(--muted-text-color, #888);-}--/* OAuth section heading: the title text and its configured/not-configured status badge on one line,- the badge sitting just after the title. */-.oauth-status-title {- display: inline-flex;- align-items: center;- gap: 10px;-}--/* Status badge mirrors the page-header MFA badge: a colored outline whose hue is driven by --color- (green when configured, muted otherwise). */-.oauth-status-badge.configured {- --color: var(--admonition-tip-accent-color, #40c025);-}--.oauth-status-badge.not-configured {- --color: var(--muted-text-color, #888);-}-/* Keeps the "Recovery codes" label text and its dots on one line, the dots sitting just after thetitle. Lives inside the row's <label>, so text and dots share one box and stay aligned. */.recovery-codes-title {diff --git a/apps/client/src/widgets/type_widgets/options/multi_factor_authentication.tsx b/apps/client/src/widgets/type_widgets/options/totp.tsxsimilarity index 71%rename from apps/client/src/widgets/type_widgets/options/multi_factor_authentication.tsxrename to apps/client/src/widgets/type_widgets/options/totp.tsxindex a8f8649181..64c0a1dfb7 100644--- a/apps/client/src/widgets/type_widgets/options/multi_factor_authentication.tsx+++ b/apps/client/src/widgets/type_widgets/options/totp.tsx@@ -1,6 +1,6 @@-import "./multi_factor_authentication.css";+import "./totp.css";-import { OAuthStatus, TOTPEnableResponse, TOTPGenerate, TOTPRecoveryKeysResponse, TOTPStatus, TOTPVerifyResponse } from "@triliumnext/commons";+import { TOTPEnableResponse, TOTPGenerate, TOTPRecoveryKeysResponse, TOTPStatus, TOTPVerifyResponse } from "@triliumnext/commons";import { RefObject } from "preact";import { createPortal } from "preact/compat";import { useCallback, useEffect, useMemo, useRef, useState } from "preact/hooks";@@ -11,123 +11,24 @@ import dialog from "../../../services/dialog";import { t } from "../../../services/i18n";import server from "../../../services/server";import toast from "../../../services/toast";-import utils, { isElectron } from "../../../services/utils";+import utils from "../../../services/utils";import Admonition from "../../react/Admonition";-import { Badge } from "../../react/Badge";import Button from "../../react/Button";-import Collapsible from "../../react/Collapsible";import FormCheckbox from "../../react/FormCheckbox";import FormGroup from "../../react/FormGroup";-import { FormInlineRadioGroup } from "../../react/FormRadioGroup";import FormText from "../../react/FormText";import FormTextBox from "../../react/FormTextBox";-import { useTriliumOption } from "../../react/hooks";import Modal from "../../react/Modal";-import RawHtml, { RawHtmlBlock } from "../../react/RawHtml";-import OptionsPageHeader from "./components/OptionsPageHeader";+import { RawHtmlBlock } from "../../react/RawHtml";import { OptionsRowWithButton } from "./components/OptionsRow";import OptionsSection from "./components/OptionsSection";-export default function MultiFactorAuthenticationSettings() {- const [ mfaMethod, setMfaMethod ] = useTriliumOption("mfaMethod");- const [ totpStatus, setTotpStatus ] = useState<TOTPStatus>();- const [ oauthStatus, setOauthStatus ] = useState<OAuthStatus>();-- const refreshTotpStatus = useCallback(() => {- server.get<TOTPStatus>("totp/status").then(setTotpStatus);- }, []);-- useEffect(() => {- refreshTotpStatus();- server.get<OAuthStatus>("oauth/status").then(setOauthStatus);- }, [ refreshTotpStatus ]);-- // MFA is active when the selected method is fully set up: a TOTP secret has been enrolled, or- // OAuth has all its server-side environment variables (no missing vars). There's no separate- // enable switch — enrolling a method is what turns it on, and removing it is what turns it off.- const oauthConfigured = (oauthStatus?.missingVars?.length ?? 1) === 0;- const mfaActive = (mfaMethod === "totp" && !!totpStatus?.set)- || (mfaMethod === "oauth" && oauthConfigured);-- return (!isElectron()- ? (- <>- <OptionsPageHeader actions={<MfaStatusBadge active={mfaActive} />} />- <MultiFactorMethod- mfaMethod={mfaMethod} setMfaMethod={setMfaMethod}- totpStatus={totpStatus} oauthStatus={oauthStatus}- refreshTotpStatus={refreshTotpStatus}- />- </>- ) : (- <>- <OptionsPageHeader />- <FormText>{t("multi_factor_authentication.electron_disabled")}</FormText>- </>- )- );-}--function MfaStatusBadge({ active }: { active: boolean }) {- return (- <div className="mfa-header-actions">- <Badge- className={`mfa-status-badge ${active ? "active" : "inactive"}`}- icon={active ? "bx bx-check-shield" : "bx bx-shield-x"}- text={active ? t("multi_factor_authentication.status_active") : t("multi_factor_authentication.status_inactive")}- tooltip={active ? t("multi_factor_authentication.status_active_tooltip") : t("multi_factor_authentication.status_inactive_tooltip")}- outline- />- </div>- );-}--function MultiFactorMethod({ mfaMethod, setMfaMethod, totpStatus, oauthStatus, refreshTotpStatus }: {- mfaMethod: string,- setMfaMethod: (newValue: string) => Promise<void>,- totpStatus?: TOTPStatus,- oauthStatus?: OAuthStatus,- refreshTotpStatus: () => void-}) {- // The method selector only matters during initial setup. Switching method once one is configured- // silently strands the existing setup and can leave MFA effectively off (see the remove flow),- // so once the current method is set up we hide the selector — removing TOTP (or reconfiguring- // OAuth server-side) is the way to change method.- const methodSetUp = mfaMethod === "totp" ? totpStatus?.set : oauthStatus?.enabled;-- return (- <>- <FormText><Trans i18nKey="multi_factor_authentication.description" /></FormText>-- {!methodSetUp &&- <OptionsSection className="mfa-options" title={t("multi_factor_authentication.mfa_method")}>- <FormInlineRadioGroup- name="mfaMethod"- currentValue={mfaMethod} onChange={setMfaMethod}- values={[- { value: "totp", label: t("multi_factor_authentication.totp_title") },- { value: "oauth", label: t("multi_factor_authentication.oauth_title") }- ]}- />-- <FormText>- { mfaMethod === "totp"- ? t("multi_factor_authentication.totp_description")- : <RawHtml html={t("multi_factor_authentication.oauth_description")} /> }- </FormText>- </OptionsSection>}-- { mfaMethod === "totp" &&- <TotpSettings totpStatus={totpStatus} refreshTotpStatus={refreshTotpStatus} /> }-- {/* OAuth is configured entirely server-side, so its card is read-only and stays visible- regardless of the active method — it's a status indicator for whether OAuth is available. */}- <OAuthStatusCard status={oauthStatus} />- </>- );-}--function TotpSettings({ totpStatus, refreshTotpStatus }: {+/**+ * TOTP (authenticator-app) two-factor settings. Owns the recovery-codes state and the enrollment /+ * regenerate dialogs; the TOTP secret status itself is owned by the parent (which also needs it to+ * decide whether to show the method selector) and passed in.+ */+export function TotpSettings({ totpStatus, refreshTotpStatus }: {totpStatus?: TOTPStatus,refreshTotpStatus: () => void}) {@@ -173,7 +74,7 @@ function TotpSettings({ totpStatus, refreshTotpStatus }: {await server.post("totp/reset");toast.showMessage(t("multi_factor_authentication.totp_removed"));// The secret and recovery codes are gone server-side; refresh so the section drops back to- // its "not set up" state (badge inactive, method selector shown) right away.+ // its "not set up" state (method selector shown) right away.refreshTotpStatus();refreshRecoveryKeys();}, [ refreshTotpStatus, refreshRecoveryKeys ]);@@ -637,74 +538,3 @@ function formatRecoveryCodeUsedDate(statusEntry: string) {const date = new Date(statusEntry.replace(/\//g, "-"));return isNaN(date.getTime()) ? statusEntry : date.toLocaleString();}--/**- * Read-only OAuth status card. OAuth is configured entirely server-side (env vars / config.ini),- * so this card offers no controls — it just reflects whether OAuth is available, and when it's the- * active method, the signed-in account. It stays visible even while TOTP is the active method so the- * user can always tell whether OAuth is set up.- */-function OAuthStatusCard({ status }: { status?: OAuthStatus }) {- // "Configured" is purely about the server-side variables being present, independent of which MFA- // method is currently active (the server's `enabled` flag additionally requires mfaMethod === 'oauth').- const configured = (status?.missingVars?.length ?? 1) === 0;-- return (- <OptionsSection- title={- <span className="oauth-status-title">- {t("multi_factor_authentication.oauth_title")}- <Badge- className={`oauth-status-badge ${configured ? "configured" : "not-configured"}`}- icon={configured ? "bx bx-check" : "bx bx-x"}- text={configured- ? t("multi_factor_authentication.oauth_status_configured")- : t("multi_factor_authentication.oauth_status_not_configured")}- outline- />- </span>- }- >- { configured ? (- <div class="col-md-6">- <span><b>{t("multi_factor_authentication.oauth_user_account")}</b></span>- <span class="user-account-name">{status?.name ?? t("multi_factor_authentication.oauth_user_not_logged_in")}</span>-- <br />- <span><b>{t("multi_factor_authentication.oauth_user_email")}</b></span>- <span class="user-account-email">{status?.email ?? t("multi_factor_authentication.oauth_user_not_logged_in")}</span>- </div>- ) : (- <>- <p>{t("multi_factor_authentication.oauth_not_configured_hint")}</p>-- { status?.missingVars && status.missingVars.length > 0 && (- <Admonition type="note">- {t("multi_factor_authentication.oauth_missing_vars", {- variables: status.missingVars.map(v => `"${v}"`).join(", ")- })}- </Admonition>- )}-- <OAuthConfigHint />- </>- )}- </OptionsSection>- );-}--/**- * Collapsible "How to enable" hint for OAuth, mirroring the security page's {@link ServerConfigHint}.- * Lists the config.ini section and the equivalent environment variables the server reads — OAuth has no- * in-app setup, so this is the only place the values are documented in the UI.- */-function OAuthConfigHint() {- return (- <Collapsible title={t("multi_factor_authentication.oauth_how_to_enable")}>- <p>{t("multi_factor_authentication.oauth_server_config_hint")}</p>- <pre><code>{"[MultiFactorAuthentication]\noauthBaseUrl=\noauthClientId=\noauthClientSecret="}</code></pre>- <p>{t("multi_factor_authentication.oauth_server_env_hint")}</p>- <pre><code>{"TRILIUM_OAUTH_BASE_URL=\nTRILIUM_OAUTH_CLIENT_ID=\nTRILIUM_OAUTH_CLIENT_SECRET="}</code></pre>- </Collapsible>- );-}diff --git a/apps/server/src/assets/translations/en/server.json b/apps/server/src/assets/translations/en/server.jsonindex 779722b838..51a72b2c89 100644--- a/apps/server/src/assets/translations/en/server.json+++ b/apps/server/src/assets/translations/en/server.json@@ -287,7 +287,7 @@"spellcheck-title": "Spellcheck","desktop-title": "Desktop","security-title": "Security",- "password-title": "Password",+ "password-title": "Password & Auth","multi-factor-authentication-title": "MFA","etapi-title": "ETAPI","backup-title": "Backup",diff --git a/packages/trilium-core/src/services/hidden_subtree.ts b/packages/trilium-core/src/services/hidden_subtree.tsindex abc6715c99..00137dfda0 100644--- a/packages/trilium-core/src/services/hidden_subtree.ts+++ b/packages/trilium-core/src/services/hidden_subtree.ts@@ -305,7 +305,7 @@ function buildHiddenSubtreeDefinition(helpSubtree: HiddenSubtreeItem[]): HiddenS{ id: "_optionsDesktop", title: t("hidden-subtree.desktop-title"), type: "contentWidget", icon: "bx-desktop", attributes: [{ type: "label", name: "electronOnly" }] },{ id: "_optionsSecurity", title: t("hidden-subtree.security-title"), type: "contentWidget", icon: "bx-shield" },{ id: "_optionsPassword", title: t("hidden-subtree.password-title"), type: "contentWidget", icon: "bx-lock" },- { id: '_optionsMFA', title: t('hidden-subtree.multi-factor-authentication-title'), type: 'contentWidget', icon: 'bx-lock ', attributes: [{ type: "label", name: "serverOnly" }] },+ { id: "_optionsMFA", title: t("hidden-subtree.multi-factor-authentication-title"), type: "contentWidget", enforceDeleted: true },{ id: "_optionsEtapi", title: t("hidden-subtree.etapi-title"), type: "contentWidget", icon: "bx-extension" },{ id: "_optionsBackup", title: t("hidden-subtree.backup-title"), type: "contentWidget", icon: "bx-data" },{ id: "_optionsSync", title: t("hidden-subtree.sync-title"), type: "contentWidget", icon: "bx-wifi" },