From 35ee76cebb523c21703b31a2cf4347e984490a95 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Fri, 23 Oct 2026 03:58:07 +0200 Subject: [PATCH] fix: multi-factor authentication section shows while MFA is off (#32980) Every user saw a "Multi-factor authentication" section under Account, reading "Authenticator not configured" and "Managed by your administrator.", although MFA is off by default and there is nothing to set up. The section now only shows when MFA applies to the signed-in user, so everyone who has to use an authenticator still sees it. Refs #32830 --- .../components/chat/Settings/Account.svelte | 2 +- .../chat/Settings/Account/Mfa.svelte | 139 +++++++++--------- 2 files changed, 74 insertions(+), 67 deletions(-) diff --git a/src/lib/components/chat/Settings/Account.svelte b/src/lib/components/chat/Settings/Account.svelte index 940585b567..4d74da04ac 100644 --- a/src/lib/components/chat/Settings/Account.svelte +++ b/src/lib/components/chat/Settings/Account.svelte @@ -385,7 +385,7 @@ {/if} - + {#if canUseApiKeys({ user: $user, config: $config })} diff --git a/src/lib/components/chat/Settings/Account/Mfa.svelte b/src/lib/components/chat/Settings/Account/Mfa.svelte index de71c8e3c3..32f37e7538 100644 --- a/src/lib/components/chat/Settings/Account/Mfa.svelte +++ b/src/lib/components/chat/Settings/Account/Mfa.svelte @@ -1,5 +1,6 @@ -
- {#if status} - - {status.enabled - ? $i18n.t('Authenticator configured') - : $i18n.t('Authenticator not configured')} - {#if status.required && status.enabled}{/if} - -

- {status.enabled - ? $i18n.t('{{COUNT}} recovery codes remaining', { COUNT: status.recovery_codes_remaining }) - : $i18n.t('Managed by your administrator.')} -

- {#if show && status.required && status.enabled} -
-

- {$i18n.t('Verify with a fresh code. Changes sign out all devices.')} -

- - -
- +
+ {#if status} + + {status.enabled + ? $i18n.t('Authenticator configured') + : $i18n.t('Authenticator not configured')} -
-
- {/if} - {/if} - {#if error}{/if} - {#if reauthenticate}{/if} -
+ {#if status.required && status.enabled}{/if} + +

+ {status.enabled + ? $i18n.t('{{COUNT}} recovery codes remaining', { + COUNT: status.recovery_codes_remaining + }) + : $i18n.t('Managed by your administrator.')} +

+ {#if show && status.required && status.enabled} +
+

+ {$i18n.t('Verify with a fresh code. Changes sign out all devices.')} +

+ + +
+ +
+
+ {/if} + {/if} + {#if error}{/if} + {#if reauthenticate}{/if} +
+
+{/if}