Skip to content

Open-source personal finance manager. Self-hosted, privacy-first.

fix(auth): let OIDC-only users remove existing 2FA and passkeys (#898)

Albert Dolkunebc94bf44f50
diff --git a/backend/tests/test_local_auth_cleanup.py b/backend/tests/test_local_auth_cleanup.py
new file mode 100644
index 00000000..f74b826f
--- /dev/null
+++ b/backend/tests/test_local_auth_cleanup.py
@@ -0,0 +1,80 @@
+"""Removing an enrolled factor stays possible, and stays guarded, in OIDC-only mode.
+
+A server that flips to `local_auth_enabled = false` keeps the users who enrolled
+TOTP or a passkey beforehand. There are no recovery codes, so these cleanup routes
+are the only way out and must not pick up `require_local_auth_enabled`.
+"""
+from datetime import datetime, timezone
+
+import pyotp
+import pytest
+from sqlalchemy import select
+
+from app.core.auth import get_jwt_strategy
+from app.models.passkey import UserPasskey
+
+
[email protected]("bad_factor", ["password", "totp"])
+async def test_disabled_local_auth_cleanup_requires_both_factors(
+ client, test_user, session, oidc_only_settings, bad_factor,
+):
+ secret = pyotp.random_base32()
+ test_user.totp_secret = secret
+ test_user.is_2fa_enabled = True
+ await session.commit()
+ token = await get_jwt_strategy().write_token(test_user)
+ totp = pyotp.TOTP(secret)
+ now = datetime.now(timezone.utc)
+ # Pick a six-digit code outside every accepted window, without a rare collision.
+ invalid_code = next(
+ f"{value:06d}"
+ for value in range(10)
+ if not totp.verify(f"{value:06d}", for_time=now, valid_window=1)
+ )
+ response = await client.post(
+ "/api/auth/2fa/disable",
+ headers={"Authorization": f"Bearer {token}"},
+ json={
+ "password": "wrong" if bad_factor == "password" else "testpass123",
+ "code": invalid_code if bad_factor == "totp" else totp.at(now),
+ },
+ )
+ assert response.status_code == 400
+ expected = "Invalid password" if bad_factor == "password" else "Invalid 2FA code"
+ assert response.json()["detail"] == expected
+ await session.refresh(test_user)
+ assert test_user.is_2fa_enabled is True
+ assert test_user.totp_secret == secret
+
+
+async def test_disabled_local_auth_passkey_cleanup_is_owner_scoped(
+ client, test_user, test_user_with_2fa, session, oidc_only_settings,
+):
+ own = UserPasskey(
+ user_id=test_user.id, credential_id="own", public_key="synthetic", name="Own key"
+ )
+ other = UserPasskey(
+ user_id=test_user_with_2fa.id,
+ credential_id="other",
+ public_key="synthetic",
+ name="Other key",
+ )
+ session.add_all([own, other])
+ await session.commit()
+ token = await get_jwt_strategy().write_token(test_user)
+ headers = {"Authorization": f"Bearer {token}"}
+
+ assert (await client.get("/api/auth/passkeys")).status_code == 401
+ assert (await client.delete(f"/api/auth/passkeys/{own.id}")).status_code == 401
+
+ listed = await client.get("/api/auth/passkeys", headers=headers)
+ assert listed.status_code == 200
+ assert [item["id"] for item in listed.json()] == [str(own.id)]
+
+ deleted_other = await client.delete(f"/api/auth/passkeys/{other.id}", headers=headers)
+ assert deleted_other.status_code == 404
+ deleted_own = await client.delete(f"/api/auth/passkeys/{own.id}", headers=headers)
+ assert deleted_own.status_code == 204
+
+ remaining = await session.execute(select(UserPasskey))
+ assert [item.id for item in remaining.scalars()] == [other.id]
diff --git a/frontend/src/components/app-layout.tsx b/frontend/src/components/app-layout.tsx
index b069364d..b3b07d45 100644
--- a/frontend/src/components/app-layout.tsx
+++ b/frontend/src/components/app-layout.tsx
@@ -529,21 +529,21 @@ export function AppLayout() {
{showTour && <OnboardingTour onComplete={handleTourComplete} />}
{localAuthEnabled && (
- <>
- <ChangePasswordDialog
- open={changePasswordOpen}
- onClose={() => setChangePasswordOpen(false)}
- />
- <TwoFactorSetup
- open={twoFactorOpen}
- onClose={() => setTwoFactorOpen(false)}
- />
- <PasskeyManagementDialog
- open={passkeysOpen}
- onClose={() => setPasskeysOpen(false)}
- />
- </>
+ <ChangePasswordDialog
+ open={changePasswordOpen}
+ onClose={() => setChangePasswordOpen(false)}
+ />
)}
+ <TwoFactorSetup
+ open={twoFactorOpen}
+ onClose={() => setTwoFactorOpen(false)}
+ localAuthEnabled={localAuthEnabled}
+ />
+ <PasskeyManagementDialog
+ open={passkeysOpen}
+ onClose={() => setPasskeysOpen(false)}
+ localAuthEnabled={localAuthEnabled}
+ />
<BackupDialog open={backupOpen} onClose={() => setBackupOpen(false)} />
<CommandPalette open={paletteOpen} onOpenChange={setPaletteOpen} />
{/* Slide-over global chat — opened from the sidebar pill or via
@@ -581,6 +581,7 @@ function UserMenu({
isAdmin?: boolean
agentsEnabled?: boolean
}) {
+ const { user } = useAuth()
const { t, i18n } = useTranslation()
const nav = useNavigate()
const currentLang = resolveSupportedLang(i18n.resolvedLanguage ?? i18n.language)
@@ -615,30 +616,33 @@ function UserMenu({
</>
)}
{localAuthEnabled && (
- <>
- <DropdownMenuItem
- onClick={onChangePassword}
- className="flex items-center gap-2"
- >
- <KeyRound size={14} />
- {t('auth.changePassword')}
- </DropdownMenuItem>
- <DropdownMenuItem
- onClick={onTwoFactor}
- className="flex items-center gap-2"
- >
- <ShieldCheck size={14} />
- {t('auth.twoFactorTitle')}
- </DropdownMenuItem>
- <DropdownMenuItem
- onClick={onPasskeys}
- className="flex items-center gap-2"
- >
- <Fingerprint size={14} />
- {t('auth.passkeysTitle')}
- </DropdownMenuItem>
- </>
+ <DropdownMenuItem
+ onClick={onChangePassword}
+ className="flex items-center gap-2"
+ >
+ <KeyRound size={14} />
+ {t('auth.changePassword')}
+ </DropdownMenuItem>
+ )}
+ {/* Enrolled factors outlive the switch to OIDC-only. Hiding these
+ entries would strand the user with a factor and no way to remove
+ it, since the product has no recovery codes. */}
+ {(localAuthEnabled || user?.is_2fa_enabled) && (
+ <DropdownMenuItem
+ onClick={onTwoFactor}
+ className="flex items-center gap-2"
+ >
+ <ShieldCheck size={14} />
+ {t(localAuthEnabled ? 'auth.twoFactorTitle' : 'auth.disable2fa')}
+ </DropdownMenuItem>
)}
+ <DropdownMenuItem
+ onClick={onPasskeys}
+ className="flex items-center gap-2"
+ >
+ <Fingerprint size={14} />
+ {t('auth.passkeysTitle')}
+ </DropdownMenuItem>
<DropdownMenuItem
onClick={onBackup}
className="flex items-center gap-2"
diff --git a/frontend/src/components/auth-controls.test.tsx b/frontend/src/components/auth-controls.test.tsx
new file mode 100644
index 00000000..1774ff6b
--- /dev/null
+++ b/frontend/src/components/auth-controls.test.tsx
@@ -0,0 +1,167 @@
+/**
+ * A server can switch to OIDC-only after users have already enrolled TOTP or a
+ * passkey. There are no recovery codes, so if the menu hides those entries the
+ * enrolled factor becomes unremovable. These tests assert the removal paths stay
+ * reachable on both menu surfaces while enrollment stays hidden.
+ */
+import { screen, waitFor, within } from '@testing-library/react'
+import { beforeEach, expect, it, vi } from 'vitest'
+import { AppLayout } from './app-layout'
+import { TwoFactorSetup } from './two-factor-setup'
+import { renderWithProviders, t } from '@/test/utils'
+
+const state = vi.hoisted(() => ({
+ user: {
+ email: '[email protected]',
+ is_2fa_enabled: true,
+ is_superuser: false,
+ preferences: { onboarding_completed: true },
+ },
+ workspace: { id: 'synthetic', name: 'Synthetic workspace', kind: 'personal', role: 'owner' },
+ auth: {
+ oidcConfig: vi.fn(),
+ listPasskeys: vi.fn(),
+ deletePasskey: vi.fn(),
+ disable2fa: vi.fn(),
+ setup2fa: vi.fn(),
+ enable2fa: vi.fn(),
+ registerPasskeyOptions: vi.fn(),
+ verifyPasskeyRegistration: vi.fn(),
+ },
+}))
+
+vi.mock('@/contexts/auth-context', () => ({
+ useAuth: () => ({
+ user: state.user,
+ logout: vi.fn(),
+ updateUser: (user: typeof state.user) => {
+ state.user = user
+ },
+ }),
+}))
+vi.mock('@/contexts/workspace-context', () => ({
+ useWorkspace: () => ({
+ current: state.workspace,
+ workspaces: [state.workspace],
+ switchWorkspace: vi.fn(),
+ refresh: vi.fn(),
+ hasModule: () => false,
+ canWrite: false,
+ isLoading: false,
+ }),
+}))
+vi.mock('@/contexts/collection-filter-context', () => ({
+ useCollectionFilter: () => ({ activeAccountIds: null }),
+}))
+vi.mock('@/hooks/use-feature-flags', () => ({
+ useFeatureFlags: () => ({ isLoading: false, agentsEnabled: false }),
+}))
+vi.mock('@/lib/api', () => ({
+ auth: state.auth,
+ admin: {
+ defaultColors: async () => ({ light: null, dark: null }),
+ numberFormat: async () => ({ format: 'auto' }),
+ },
+ accounts: { list: async () => [] },
+ workspaces: { create: vi.fn() },
+ info: { get: async () => ({ features: {} }) },
+}))
+vi.mock('@/lib/webauthn', () => ({
+ passkeyBlocker: () => null,
+ passkeyFailure: () => 'unknown',
+ startPasskeyRegistration: vi.fn(),
+}))
+vi.mock('sonner', () => ({ toast: { success: vi.fn(), error: vi.fn() } }))
+vi.mock('next-themes', () => ({ useTheme: () => ({ theme: 'light', setTheme: vi.fn() }) }))
+vi.mock('@/components/collection-selector', () => ({ CollectionSelector: () => null }))
+vi.mock('@/components/command-palette', () => ({ CommandPalette: () => null }))
+vi.mock('@/components/global-chat-panel', () => ({ GlobalChatPanel: () => null }))
+vi.mock('@/components/update-available-banner', () => ({ UpdateAvailableBanner: () => null }))
+vi.mock('@/components/update-available-dialog', () => ({ UpdateAvailableDialog: () => null }))
+vi.mock('@/components/backup-dialog', () => ({ BackupDialog: () => null }))
+
+/** The sidebar switcher (desktop) and the header avatar (mobile) are separate menus. */
+function openMenu(surface: string) {
+ return surface === 'mobile'
+ ? screen.getByRole('button', { name: t('common.userMenu') })
+ : screen.getByRole('button', { name: /Synthetic workspace/ })
+}
+
+beforeEach(() => {
+ vi.clearAllMocks()
+ state.user = { ...state.user, is_2fa_enabled: true }
+ state.auth.oidcConfig.mockResolvedValue({
+ enabled: true,
+ local_auth_enabled: false,
+ provider_name: 'SSO',
+ })
+ state.auth.listPasskeys.mockResolvedValue([
+ { id: 'synthetic-key', name: 'Saved key', created_at: '2026-01-01T00:00:00Z', last_used_at: null },
+ ])
+ state.auth.disable2fa.mockResolvedValue({})
+ state.auth.deletePasskey.mockResolvedValue(undefined)
+})
+
+it.each(['desktop', 'mobile'])(
+ 'keeps 2FA and passkey removal reachable from the %s menu in OIDC-only mode',
+ async (surface) => {
+ const { user } = renderWithProviders(<AppLayout />)
+ await waitFor(() => expect(state.auth.oidcConfig).toHaveBeenCalled())
+
+ await user.click(openMenu(surface))
+ expect(
+ screen.queryByRole('menuitem', { name: t('auth.changePassword') }),
+ ).not.toBeInTheDocument()
+
+ await user.click(screen.getByRole('menuitem', { name: t('auth.disable2fa') }))
+ const twoFactorDialog = screen.getByRole('dialog')
+ await user.type(within(twoFactorDialog).getByLabelText(t('auth.password')), 'synthetic-password')
+ await user.type(within(twoFactorDialog).getByLabelText(t('auth.twoFactor')), '123456')
+ await user.click(within(twoFactorDialog).getByRole('button', { name: t('auth.disable2fa') }))
+ await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument())
+ expect(state.auth.disable2fa).toHaveBeenCalledWith('synthetic-password', '123456')
+
+ // The entry retires with the factor it removed.
+ await user.click(openMenu(surface))
+ expect(screen.queryByRole('menuitem', { name: t('auth.disable2fa') })).not.toBeInTheDocument()
+
+ await user.click(screen.getByRole('menuitem', { name: t('auth.passkeysTitle') }))
+ await screen.findByText('Saved key')
+ expect(screen.getByText(t('auth.passkeysCleanupDescription'))).toBeInTheDocument()
+ expect(screen.queryByRole('button', { name: t('auth.addPasskey') })).not.toBeInTheDocument()
+
+ await user.click(screen.getByRole('button', { name: t('auth.deletePasskey') }))
+ await user.click(screen.getByRole('button', { name: t('common.delete') }))
+ expect(await screen.findByText(t('auth.noPasskeys'))).toBeInTheDocument()
+ expect(state.auth.deletePasskey).toHaveBeenCalledWith('synthetic-key')
+
+ expect(state.auth.setup2fa).not.toHaveBeenCalled()
+ expect(state.auth.enable2fa).not.toHaveBeenCalled()
+ expect(state.auth.registerPasskeyOptions).not.toHaveBeenCalled()
+ },
+)
+
+it.each(['desktop', 'mobile'])(
+ 'still offers the full local credential menu on the %s surface',
+ async (surface) => {
+ state.auth.oidcConfig.mockResolvedValue({ enabled: false, local_auth_enabled: true })
+ state.user = { ...state.user, is_2fa_enabled: false }
+ const { user } = renderWithProviders(<AppLayout />)
+ await waitFor(() => expect(state.auth.oidcConfig).toHaveBeenCalled())
+
+ await user.click(openMenu(surface))
+ expect(screen.getByRole('menuitem', { name: t('auth.changePassword') })).toBeInTheDocument()
+ expect(screen.getByRole('menuitem', { name: t('auth.twoFactorTitle') })).toBeInTheDocument()
+
+ await user.click(screen.getByRole('menuitem', { name: t('auth.passkeysTitle') }))
+ await screen.findByText('Saved key')
+ expect(screen.getByRole('button', { name: t('auth.addPasskey') })).toBeInTheDocument()
+ },
+)
+
+it('never offers TOTP enrollment once the enrolled factor is gone', () => {
+ state.user = { ...state.user, is_2fa_enabled: false }
+ renderWithProviders(<TwoFactorSetup open localAuthEnabled={false} onClose={vi.fn()} />)
+ expect(screen.queryByRole('dialog')).not.toBeInTheDocument()
+ expect(state.auth.setup2fa).not.toHaveBeenCalled()
+})
diff --git a/frontend/src/components/passkey-management-dialog.tsx b/frontend/src/components/passkey-management-dialog.tsx
index f07a518c..978e8e4f 100644
--- a/frontend/src/components/passkey-management-dialog.tsx
+++ b/frontend/src/components/passkey-management-dialog.tsx
@@ -20,6 +20,7 @@ import { Label } from '@/components/ui/label'
interface PasskeyManagementDialogProps {
open: boolean
onClose: () => void
+ localAuthEnabled?: boolean
}
const FAILURE_KEYS: Record<PasskeyFailure, string> = {
@@ -33,7 +34,7 @@ const FAILURE_KEYS: Record<PasskeyFailure, string> = {
unknown: 'auth.passkeyRegisterError',
}
-export function PasskeyManagementDialog({ open, onClose }: PasskeyManagementDialogProps) {
+export function PasskeyManagementDialog({ open, onClose, localAuthEnabled = true }: PasskeyManagementDialogProps) {
const { t } = useTranslation()
const [passkeys, setPasskeys] = useState<Passkey[]>([])
const [name, setName] = useState('')
@@ -42,7 +43,10 @@ export function PasskeyManagementDialog({ open, onClose }: PasskeyManagementDial
const [deletingId, setDeletingId] = useState<string | null>(null)
const [confirmDeleteId, setConfirmDeleteId] = useState<string | null>(null)
const [loadFailed, setLoadFailed] = useState(false)
- const blocker = passkeyBlocker()
+ // The blocker only explains why registration is unavailable. With local auth
+ // off there is no registration form to explain, so the warning would be noise
+ // on top of the cleanup copy.
+ const blocker = localAuthEnabled ? passkeyBlocker() : null
const loadPasskeys = useCallback(async () => {
setLoading(true)
@@ -73,6 +77,7 @@ export function PasskeyManagementDialog({ open, onClose }: PasskeyManagementDial
const handleRegister = async (event: React.FormEvent) => {
event.preventDefault()
+ if (!localAuthEnabled) return
const passkeyName = name.trim() || t('auth.defaultPasskeyName')
setSaving(true)
try {
@@ -111,7 +116,7 @@ export function PasskeyManagementDialog({ open, onClose }: PasskeyManagementDial
</DialogHeader>
<div className="space-y-4">
- <p className="text-sm text-muted-foreground">{t('auth.passkeysDescription')}</p>
+ <p className="text-sm text-muted-foreground">{t(localAuthEnabled ? 'auth.passkeysDescription' : 'auth.passkeysCleanupDescription')}</p>
{blocker && (
<div className="flex items-start gap-2.5 rounded-lg bg-amber-500/10 px-3 py-2.5 text-sm text-amber-700 dark:text-amber-300">
@@ -120,23 +125,25 @@ export function PasskeyManagementDialog({ open, onClose }: PasskeyManagementDial
</div>
)}
- <form onSubmit={handleRegister} className="space-y-3 rounded-lg border p-3">
- <div className="space-y-1.5">
- <Label htmlFor="passkey-name">{t('auth.passkeyName')}</Label>
- <Input
- id="passkey-name"
- value={name}
- onChange={(event) => setName(event.target.value)}
- placeholder={t('auth.passkeyNamePlaceholder')}
- maxLength={100}
- disabled={saving || !!blocker}
- />
- </div>
- <Button type="submit" disabled={!!blocker || saving} className="w-full">
- {saving && <Loader2 size={15} className="animate-spin" />}
- {saving ? t('auth.passkeyWaiting') : t('auth.addPasskey')}
- </Button>
- </form>
+ {localAuthEnabled && (
+ <form onSubmit={handleRegister} className="space-y-3 rounded-lg border p-3">
+ <div className="space-y-1.5">
+ <Label htmlFor="passkey-name">{t('auth.passkeyName')}</Label>
+ <Input
+ id="passkey-name"
+ value={name}
+ onChange={(event) => setName(event.target.value)}
+ placeholder={t('auth.passkeyNamePlaceholder')}
+ maxLength={100}
+ disabled={saving || !!blocker}
+ />
+ </div>
+ <Button type="submit" disabled={!!blocker || saving} className="w-full">
+ {saving && <Loader2 size={15} className="animate-spin" />}
+ {saving ? t('auth.passkeyWaiting') : t('auth.addPasskey')}
+ </Button>
+ </form>
+ )}
<div className="space-y-2">
{loading ? (
diff --git a/frontend/src/components/two-factor-setup.tsx b/frontend/src/components/two-factor-setup.tsx
index 8e55a5bc..27970a5f 100644
--- a/frontend/src/components/two-factor-setup.tsx
+++ b/frontend/src/components/two-factor-setup.tsx
@@ -20,9 +20,10 @@ import { Label } from '@/components/ui/label'
interface TwoFactorSetupProps {
open: boolean
onClose: () => void
+ localAuthEnabled?: boolean
}
-export function TwoFactorSetup({ open, onClose }: TwoFactorSetupProps) {
+export function TwoFactorSetup({ open, onClose, localAuthEnabled = true }: TwoFactorSetupProps) {
const { t } = useTranslation()
const { user, updateUser } = useAuth()
const is2faEnabled = user?.is_2fa_enabled ?? false
@@ -41,6 +42,7 @@ export function TwoFactorSetup({ open, onClose }: TwoFactorSetupProps) {
const [disableLoading, setDisableLoading] = useState(false)
const handleSetup = async () => {
+ if (!localAuthEnabled) return
setSetupLoading(true)
setError('')
try {
@@ -57,6 +59,7 @@ export function TwoFactorSetup({ open, onClose }: TwoFactorSetupProps) {
const handleEnable = async (e: React.FormEvent) => {
e.preventDefault()
+ if (!localAuthEnabled) return
setSetupLoading(true)
setError('')
try {
@@ -157,6 +160,11 @@ export function TwoFactorSetup({ open, onClose }: TwoFactorSetupProps) {
)
}
+ // Enrollment is a local-credential feature: with local auth off the backend
+ // refuses /2fa/setup, so the dialog exists only to let an already-enrolled
+ // user disable 2FA.
+ if (!localAuthEnabled) return null
+
// Enable flow
return (
<Dialog open={open} onOpenChange={(v) => !v && handleClose()}>
diff --git a/frontend/src/components/workspace-switcher.tsx b/frontend/src/components/workspace-switcher.tsx
index 910746c0..ac4a4033 100644
--- a/frontend/src/components/workspace-switcher.tsx
+++ b/frontend/src/components/workspace-switcher.tsx
@@ -234,30 +234,30 @@ export function WorkspaceSwitcher({
{/* Account actions */}
{localAuthEnabled && (
- <>
- <DropdownMenuItem
- onClick={onChangePassword}
- className="flex items-center gap-2"
- >
- <KeyRound size={14} />
- {t('auth.changePassword')}
- </DropdownMenuItem>
- <DropdownMenuItem
- onClick={onTwoFactor}
- className="flex items-center gap-2"
- >
- <ShieldCheck size={14} />
- {t('auth.twoFactorTitle')}
- </DropdownMenuItem>
- <DropdownMenuItem
- onClick={onPasskeys}
- className="flex items-center gap-2"
- >
- <Fingerprint size={14} />
- {t('auth.passkeysTitle')}
- </DropdownMenuItem>
- </>
+ <DropdownMenuItem
+ onClick={onChangePassword}
+ className="flex items-center gap-2"
+ >
+ <KeyRound size={14} />
+ {t('auth.changePassword')}
+ </DropdownMenuItem>
)}
+ {(localAuthEnabled || user.is_2fa_enabled) && (
+ <DropdownMenuItem
+ onClick={onTwoFactor}
+ className="flex items-center gap-2"
+ >
+ <ShieldCheck size={14} />
+ {t(localAuthEnabled ? 'auth.twoFactorTitle' : 'auth.disable2fa')}
+ </DropdownMenuItem>
+ )}
+ <DropdownMenuItem
+ onClick={onPasskeys}
+ className="flex items-center gap-2"
+ >
+ <Fingerprint size={14} />
+ {t('auth.passkeysTitle')}
+ </DropdownMenuItem>
<DropdownMenuItem
onClick={onBackup}
className="flex items-center gap-2"
diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json
index 808b0aa1..a52405f1 100644
--- a/frontend/src/locales/de.json
+++ b/frontend/src/locales/de.json
@@ -460,6 +460,7 @@
"passkeySecondFactorPrompt": "Klicke auf die Schaltfläche unten und folge den Anweisungen deines Browsers für den Sicherheitsschlüssel.",
"passkeysTitle": "Passkeys",
"passkeysDescription": "Verwende Sicherheitsschlüssel oder Geräte-Passkeys, um dich ohne Passwort anzumelden. Registrierte Passkeys schützen auch die Passwort-Anmeldung als zweiten Faktor; die Anmeldung nur mit Passkey überspringt den Authentifikator-Code-Schritt, da der Schlüssel bereits den Besitz nachweist.",
+ "passkeysCleanupDescription": "Die lokale Anmeldung ist deaktiviert. Sie können gespeicherte Passkeys entfernen, aber keine neuen hinzufügen.",
"passkeyLoadError": "Passkeys konnten nicht geladen werden",
"passkeyUnsupported": "Dieser Browser unterstützt keine Passkeys.",
"passkeyInsecureContext": "Passkeys erfordern eine sichere Verbindung. Öffne Securo über HTTPS oder auf http://localhost.",
diff --git a/frontend/src/locales/el.json b/frontend/src/locales/el.json
index 10017572..12adce1c 100644
--- a/frontend/src/locales/el.json
+++ b/frontend/src/locales/el.json
@@ -460,6 +460,7 @@
"passkeySecondFactorPrompt": "Κάντε κλικ στο παρακάτω κουμπί και ακολουθήστε τις οδηγίες κλειδιού ασφαλείας του προγράμματος περιήγησης.",
"passkeysTitle": "Κλειδιά πρόσβασης (Passkeys)",
"passkeysDescription": "Χρησιμοποιήστε κλειδιά ασφαλείας ή passkeys συσκευής για να συνδεθείτε χωρίς να πληκτρολογήσετε τον κωδικό σας. Τα εγγεγραμμένα passkeys προστατεύουν επίσης τη σύνδεση με κωδικό ως δεύτερος παράγοντας. Η σύνδεση μόνο με passkey παραλείπει το βήμα του κωδικού εφαρμογής, καθώς το κλειδί επαληθεύει ήδη την κατοχή της συσκευής.",
+ "passkeysCleanupDescription": "Η τοπική σύνδεση είναι απενεργοποιημένη. Μπορείτε να αφαιρέσετε αποθηκευμένα κλειδιά πρόσβασης, αλλά όχι να προσθέσετε νέα.",
"passkeyLoadError": "Δεν ήταν δυνατή η φόρτωση των κλειδιών πρόσβασης",
"passkeyUnsupported": "Αυτό το πρόγραμμα περιήγησης δεν υποστηρίζει passkeys.",
"passkeyInsecureContext": "Τα passkeys απαιτούν ασφαλή σύνδεση. Ανοίξτε το Securo μέσω HTTPS ή στο http://localhost.",
diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json
index 0e39b1dd..c753b995 100644
--- a/frontend/src/locales/en.json
+++ b/frontend/src/locales/en.json
@@ -460,6 +460,7 @@
"passkeySecondFactorPrompt": "Click the button below and follow your browser's security-key prompt.",
"passkeysTitle": "Passkeys",
"passkeysDescription": "Use security keys or device passkeys to sign in without entering your password. Enrolled passkeys also protect password sign-in as a second factor; passkey-only sign-in skips the authenticator-code step because the key already verifies possession.",
+ "passkeysCleanupDescription": "Local sign-in is disabled. You can remove saved passkeys, but cannot add new ones.",
"passkeyLoadError": "Could not load passkeys",
"passkeyUnsupported": "This browser does not support passkeys.",
"passkeyInsecureContext": "Passkeys need a secure connection. Open Securo over HTTPS, or on http://localhost.",
diff --git a/frontend/src/locales/es.json b/frontend/src/locales/es.json
index ee48ed1c..3366cbab 100644
--- a/frontend/src/locales/es.json
+++ b/frontend/src/locales/es.json
@@ -460,6 +460,7 @@
"passkeySecondFactorPrompt": "Haz clic en el botón de abajo y sigue la solicitud de llave de seguridad del navegador.",
"passkeysTitle": "Llaves de acceso",
"passkeysDescription": "Usa llaves de seguridad o llaves de acceso del dispositivo para iniciar sesión sin introducir la contraseña. Las llaves registradas también protegen el inicio con contraseña como segundo factor; el inicio solo con llave omite el código autenticador porque la llave ya verifica la posesión.",
+ "passkeysCleanupDescription": "El inicio de sesión local está desactivado. Puede eliminar claves de acceso guardadas, pero no añadir nuevas.",
"passkeyLoadError": "No se pudieron cargar las llaves de acceso",
"passkeyUnsupported": "Este navegador no admite passkeys.",
"passkeyInsecureContext": "Las passkeys requieren una conexión segura. Abre Securo por HTTPS o en http://localhost.",
diff --git a/frontend/src/locales/fr.json b/frontend/src/locales/fr.json
index 19ed587d..71abb747 100644
--- a/frontend/src/locales/fr.json
+++ b/frontend/src/locales/fr.json
@@ -460,6 +460,7 @@
"passkeySecondFactorPrompt": "Cliquez sur le bouton ci-dessous et suivez l'invite de clé de sécurité de votre navigateur.",
"passkeysTitle": "Clés d'accès",
"passkeysDescription": "Utilisez des clés de sécurité ou les clés d'accès de vos appareils pour vous connecter sans saisir votre mot de passe. Les clés d'accès enregistrées protègent également la connexion par mot de passe comme second facteur ; la connexion par clé d'accès seule ignore l'étape du code d'authentification, car la clé vérifie déjà la possession.",
+ "passkeysCleanupDescription": "La connexion locale est désactivée. Vous pouvez supprimer les clés d’accès enregistrées, mais pas en ajouter.",
"passkeyLoadError": "Impossible de charger les clés d'accès",
"passkeyUnsupported": "Ce navigateur ne prend pas en charge les clés d'accès.",
"passkeyInsecureContext": "Les clés d'accès nécessitent une connexion sécurisée. Ouvrez Securo en HTTPS, ou sur http://localhost.",
diff --git a/frontend/src/locales/hi.json b/frontend/src/locales/hi.json
index 9a70d516..dfade35b 100644
--- a/frontend/src/locales/hi.json
+++ b/frontend/src/locales/hi.json
@@ -460,6 +460,7 @@
"passkeySecondFactorPrompt": "नीचे दिए बटन पर क्लिक करें और अपने ब्राउज़र के सुरक्षा-कुंजी प्रॉम्प्ट का पालन करें।",
"passkeysTitle": "पासकी",
"passkeysDescription": "पासवर्ड डाले बिना साइन इन करने के लिए सुरक्षा कुंजी या डिवाइस पासकी उपयोग करें। नामांकित पासकी दूसरे कारक के रूप में पासवर्ड साइन-इन की भी रक्षा करती हैं; केवल-पासकी साइन-इन ऑथेंटिकेटर-कोड चरण छोड़ देता है क्योंकि कुंजी पहले ही क़ब्ज़े की पुष्टि कर देती है।",
+ "passkeysCleanupDescription": "स्थानीय साइन-इन बंद है। आप सहेजी गई पासकी हटा सकते हैं, लेकिन नई पासकी नहीं जोड़ सकते।",
"passkeyLoadError": "पासकी लोड नहीं हो सकीं",
"passkeyUnsupported": "यह ब्राउज़र पासकी का समर्थन नहीं करता।",
"passkeyInsecureContext": "पासकी के लिए सुरक्षित कनेक्शन चाहिए। Securo को HTTPS पर, या http://localhost पर खोलें।",
diff --git a/frontend/src/locales/it.json b/frontend/src/locales/it.json
index 8575a746..fcbfd553 100644
--- a/frontend/src/locales/it.json
+++ b/frontend/src/locales/it.json
@@ -460,6 +460,7 @@
"passkeySecondFactorPrompt": "Fai clic sul pulsante qui sotto e segui la richiesta della chiave di sicurezza del browser.",
"passkeysTitle": "Passkey",
"passkeysDescription": "Usa chiavi di sicurezza o passkey del dispositivo per accedere senza inserire la password. Le passkey registrate proteggono anche l'accesso con password come secondo fattore; l'accesso solo con passkey salta il codice dell'app di autenticazione perché la chiave verifica già il possesso.",
+ "passkeysCleanupDescription": "L’accesso locale è disattivato. Puoi rimuovere le passkey salvate, ma non aggiungerne di nuove.",
"passkeyLoadError": "Impossibile caricare le passkey",
"passkeyUnsupported": "Questo browser non supporta le passkey.",
"passkeyInsecureContext": "Le passkey richiedono una connessione sicura. Apri Securo tramite HTTPS o su http://localhost.",
diff --git a/frontend/src/locales/ja.json b/frontend/src/locales/ja.json
index a36d4687..3f2788b2 100644
--- a/frontend/src/locales/ja.json
+++ b/frontend/src/locales/ja.json
@@ -460,6 +460,7 @@
"passkeySecondFactorPrompt": "下のボタンをクリックし、ブラウザのセキュリティキーのプロンプトに従ってください。",
"passkeysTitle": "パスキー",
"passkeysDescription": "セキュリティキーやデバイスのパスキーで、パスワードなしでサインインできます。登録済みのパスキーはパスワードログインの第二要素としても機能します。パスキーのみのサインインでは、キーが本人確認を代行するため認証コードの入力は省かれます。",
+ "passkeysCleanupDescription": "ローカルログインは無効です。保存済みのパスキーは削除できますが、新しく追加することはできません。",
"passkeyLoadError": "パスキーを読み込めませんでした",
"passkeyUnsupported": "このブラウザはパスキーに対応していません。",
"passkeyInsecureContext": "パスキーにはセキュアな接続が必要です。HTTPSで開くか、http://localhostでSecuroを開いてください。",
diff --git a/frontend/src/locales/nl.json b/frontend/src/locales/nl.json
index 9daa480e..209d022a 100644
--- a/frontend/src/locales/nl.json
+++ b/frontend/src/locales/nl.json
@@ -458,6 +458,7 @@
"passkeySecondFactorPrompt": "Klik op de onderstaande knop en volg de prompt van de beveiligingssleutel van uw browser.",
"passkeysTitle": "Passkeys",
"passkeysDescription": "Gebruik beveiligingssleutels of passkeys van uw apparaat om in te loggen zonder uw wachtwoord in te voeren. Geregistreerde passkeys beschermen ook het inloggen met een wachtwoord als tweede factor; bij inloggen met alleen een passkey wordt de stap met de authenticatiecode overgeslagen, omdat de sleutel het bezit al verifieert.",
+ "passkeysCleanupDescription": "Lokaal aanmelden is uitgeschakeld. U kunt opgeslagen passkeys verwijderen, maar geen nieuwe toevoegen.",
"passkeyLoadError": "Kan de passkeys niet laden",
"passkeyUnsupported": "Deze browser ondersteunt geen passkeys.",
"passkeyInsecureContext": "Passkeys hebben een beveiligde verbinding nodig. Open Securo via HTTPS of op http://localhost.",
diff --git a/frontend/src/locales/pl.json b/frontend/src/locales/pl.json
index afc6fa12..b2a13109 100644
--- a/frontend/src/locales/pl.json
+++ b/frontend/src/locales/pl.json
@@ -464,6 +464,7 @@
"passkeySecondFactorPrompt": "Kliknij przycisk poniżej i postępuj zgodnie z prośbą przeglądarki o klucz bezpieczeństwa.",
"passkeysTitle": "Klucze dostępu",
"passkeysDescription": "Używaj kluczy bezpieczeństwa lub kluczy dostępu urządzenia, aby logować się bez wpisywania hasła. Zarejestrowane klucze chronią też logowanie hasłem jako drugi składnik; logowanie samym kluczem pomija kod z aplikacji, bo klucz już potwierdza posiadanie.",
+ "passkeysCleanupDescription": "Logowanie lokalne jest wyłączone. Możesz usuwać zapisane klucze dostępu, ale nie możesz dodawać nowych.",
"passkeyLoadError": "Nie udało się załadować kluczy dostępu",
"passkeyUnsupported": "Ta przeglądarka nie obsługuje kluczy dostępu.",
"passkeyInsecureContext": "Klucze dostępu wymagają bezpiecznego połączenia. Otwórz Securo przez HTTPS lub na http://localhost.",
diff --git a/frontend/src/locales/pt-BR.json b/frontend/src/locales/pt-BR.json
index 7f98fd03..14058b8c 100644
--- a/frontend/src/locales/pt-BR.json
+++ b/frontend/src/locales/pt-BR.json
@@ -460,6 +460,7 @@
"passkeySecondFactorPrompt": "Clique no botão abaixo e siga a solicitação de chave de segurança do navegador.",
"passkeysTitle": "Chaves de acesso",
"passkeysDescription": "Use chaves de segurança ou chaves de acesso do dispositivo para entrar sem digitar sua senha. Chaves de acesso cadastradas também protegem o login por senha como segundo fator; o login somente por chave pula o código autenticador porque a chave já comprova a posse.",
+ "passkeysCleanupDescription": "O acesso local está desativado. Você pode remover chaves de acesso salvas, mas não adicionar novas.",
"passkeyLoadError": "Não foi possível carregar as chaves de acesso",
"passkeyUnsupported": "Este navegador não oferece suporte a passkeys.",
"passkeyInsecureContext": "Passkeys exigem uma conexão segura. Abra o Securo por HTTPS ou em http://localhost.",
diff --git a/frontend/src/locales/pt-PT.json b/frontend/src/locales/pt-PT.json
index d2347a1e..2f0d9ead 100644
--- a/frontend/src/locales/pt-PT.json
+++ b/frontend/src/locales/pt-PT.json
@@ -460,6 +460,7 @@
"passkeySecondFactorPrompt": "Clica no botão abaixo e segue o pedido de chave de segurança do navegador.",
"passkeysTitle": "Chaves de acesso",
"passkeysDescription": "Utiliza chaves de segurança ou chaves de acesso do dispositivo para iniciar sessão sem introduzir a palavra-passe. As chaves de acesso registadas também protegem o início de sessão com palavra-passe como segundo fator; o início de sessão apenas com chave dispensa o código autenticador, uma vez que a chave já comprova a identidade.",
+ "passkeysCleanupDescription": "O início de sessão local está desativado. Pode remover chaves de acesso guardadas, mas não adicionar novas.",
"passkeyLoadError": "Não foi possível carregar as chaves de acesso",
"passkeyUnsupported": "Este navegador não suporta chaves de acesso.",
"passkeyInsecureContext": "As chaves de acesso exigem uma ligação segura. Acede ao Securo através de HTTPS ou de http://localhost.",
diff --git a/frontend/src/locales/ru.json b/frontend/src/locales/ru.json
index c7c32cb1..f6683fc3 100644
--- a/frontend/src/locales/ru.json
+++ b/frontend/src/locales/ru.json
@@ -464,6 +464,7 @@
"passkeySecondFactorPrompt": "Нажмите кнопку ниже и следуйте запросу ключа безопасности в браузере.",
"passkeysTitle": "Ключи доступа",
"passkeysDescription": "Используйте ключи безопасности или ключи доступа устройства, чтобы входить без ввода пароля. Зарегистрированные ключи доступа также защищают вход по паролю как второй фактор; вход только по ключу доступа пропускает шаг с кодом аутентификатора, потому что ключ уже подтверждает владение.",
+ "passkeysCleanupDescription": "Локальный вход отключён. Вы можете удалять сохранённые ключи доступа, но не добавлять новые.",
"passkeyLoadError": "Не удалось загрузить ключи доступа",
"passkeyUnsupported": "Этот браузер не поддерживает passkey.",
"passkeyInsecureContext": "Для passkey нужно защищённое соединение. Откройте Securo по HTTPS или на http://localhost.",
diff --git a/frontend/src/locales/sk.json b/frontend/src/locales/sk.json
index 523834fd..35bd18e9 100644
--- a/frontend/src/locales/sk.json
+++ b/frontend/src/locales/sk.json
@@ -464,6 +464,7 @@
"passkeySecondFactorPrompt": "Klikni na tlačidlo nižšie a postupuj podľa výzvy prehliadača pre bezpečnostný kľúč.",
"passkeysTitle": "Passkey",
"passkeysDescription": "Prihlasuj sa bezpečnostnými kľúčmi alebo passkey zariadenia bez zadávania hesla. Zaregistrované passkey chránia aj prihlásenie heslom ako druhý faktor; prihlásenie len cez passkey preskočí krok s kódom z overovacej aplikácie, pretože kľúč už overuje vlastníctvo.",
+ "passkeysCleanupDescription": "Lokálne prihlásenie je vypnuté. Uložené prístupové kľúče môžete odstrániť, ale nemôžete pridávať nové.",
"passkeyLoadError": "Passkey sa nepodarilo načítať",
"passkeyUnsupported": "Tento prehliadač nepodporuje passkey.",
"passkeyInsecureContext": "Passkey vyžadujú zabezpečené pripojenie. Otvor Securo cez HTTPS alebo na http://localhost.",
diff --git a/frontend/src/locales/uk.json b/frontend/src/locales/uk.json
index edaddb67..e49164e6 100644
--- a/frontend/src/locales/uk.json
+++ b/frontend/src/locales/uk.json
@@ -464,6 +464,7 @@
"passkeySecondFactorPrompt": "Натисніть кнопку нижче та дотримуйтесь запиту ключа безпеки у браузері.",
"passkeysTitle": "Ключі доступу",
"passkeysDescription": "Використовуйте ключі безпеки або ключі доступу пристрою, щоб входити без введення пароля. Зареєстровані ключі доступу також захищають вхід за паролем як другий фактор; вхід лише за ключем доступу пропускає крок із кодом автентифікатора, бо ключ уже підтверджує володіння.",
+ "passkeysCleanupDescription": "Локальний вхід вимкнено. Ви можете видаляти збережені ключі доступу, але не додавати нові.",
"passkeyLoadError": "Не вдалося завантажити ключі доступу",
"passkeyUnsupported": "Цей браузер не підтримує passkey.",
"passkeyInsecureContext": "Для passkey потрібне захищене з'єднання. Відкрийте Securo через HTTPS або на http://localhost.",
diff --git a/frontend/tsconfig.test.json b/frontend/tsconfig.test.json
index 3126f00a..dc36cdfc 100644
--- a/frontend/tsconfig.test.json
+++ b/frontend/tsconfig.test.json
@@ -34,5 +34,14 @@
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
- "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/test/**/*"]
+ /* `vite-env.d.ts` declares the build-time `__APP_VERSION__` global that
+ vitest.config.ts defines. A test rendering the app shell reaches
+ lib/build-info through its imports, so this project needs the
+ declaration too. */
+ "include": [
+ "src/**/*.test.ts",
+ "src/**/*.test.tsx",
+ "src/test/**/*",
+ "src/vite-env.d.ts"
+ ]
}