WebUI access was a single shared password. This adds optional
Authenticator TOTP as a second factor, with one-time recovery codes
and SSH as the last-resort disable path.
Login stays two HTTP posts with no pending token: a correct password
and enabled 2FA without a second factor returns { needsTotp: true };
the client then resubmits { password, totp } or { password, recoveryCode }.
The TOTP secret is wrapped with a password-derived AES-256-GCM key.
Eight XXXX-XXXX recovery codes are stored as SHA-256 hashes and each
code is consumed once. Enabling or disabling 2FA invalidates other
sessions; disabling still requires password plus TOTP or a recovery
code. SNOWLUMA_DEV_MODE hides the feature.
The login page uses a dedicated second-factor screen (Interior OTP
cells for the 6-digit code; the same cell UI for recovery codes,
grouped as XXXX-XXXX). Settings expose enroll/confirm/disable and
one-time recovery-code display.
Fixes #351
56 lines
1.5 KiB
JSON
56 lines
1.5 KiB
JSON
{
|
|
"license": "SEE LICENSE IN LICENSE",
|
|
"name": "webui",
|
|
"private": true,
|
|
"version": "1.14.5",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc -b && vite build",
|
|
"test": "vitest run",
|
|
"typecheck": "tsc -b",
|
|
"lint": "eslint .",
|
|
"preview": "vite preview"
|
|
},
|
|
"dependencies": {
|
|
"@radix-ui/react-dialog": "^1.1.7",
|
|
"@radix-ui/react-label": "^2.1.3",
|
|
"@radix-ui/react-scroll-area": "^1.2.4",
|
|
"@radix-ui/react-separator": "^1.1.3",
|
|
"@radix-ui/react-slider": "^1.4.3",
|
|
"@radix-ui/react-slot": "^1.1.3",
|
|
"@radix-ui/react-tooltip": "^1.1.9",
|
|
"@snowluma/common": "workspace:*",
|
|
"@tanstack/react-router": "^1.169.2",
|
|
"@tanstack/react-virtual": "^3.14.5",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"gridstack": "^12.6.0",
|
|
"lucide-react": "^0.469.0",
|
|
"motion": "^12.0.0",
|
|
"react": "^19.2.5",
|
|
"react-dom": "^19.2.5",
|
|
"tailwind-merge": "^3.5.0",
|
|
"tw-animate-css": "^1.2.5",
|
|
"uqr": "^0.1.3"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@tailwindcss/vite": "^4.2.2",
|
|
"@types/node": "catalog:",
|
|
"@types/react": "^19.2.14",
|
|
"@types/react-dom": "^19.2.3",
|
|
"@vitejs/plugin-react": "^6.0.1",
|
|
"eslint": "^10.2.0",
|
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
"globals": "^17.5.0",
|
|
"jiti": "^2.6.1",
|
|
"tailwindcss": "^4.2.2",
|
|
"typescript": "catalog:",
|
|
"typescript-eslint": "^8.58.2",
|
|
"vite": "catalog:",
|
|
"vitest": "^4.1.4"
|
|
}
|
|
}
|