From 69241a28b18959550716cf363e417a1c2fe38076 Mon Sep 17 00:00:00 2001 From: ssmithx Date: Wed, 9 Sep 2026 18:33:21 +0000 Subject: [PATCH] feat(auth): add an admin-managed login allowlist Lets the admin restrict which pubkeys may log in, enforced server-side at /api/auth/login before a session is issued. Disabled by default; the admin and the bootstrap (no-admin-claimed-yet) case always pass. Manageable via the existing settings UI/API (npub or hex, one per line). Co-Authored-By: Claude Sonnet 5 --- frontend/src/views/SettingsView.vue | 57 ++++++++++++++++++++++- server/src/app.test.ts | 72 +++++++++++++++++++++++++++++ server/src/routes/auth.ts | 3 ++ server/src/routes/settings.ts | 17 ++++++- server/src/services/settings.ts | 17 +++++++ 5 files changed, 164 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/SettingsView.vue b/frontend/src/views/SettingsView.vue index 6d9d915..107b5ed 100644 --- a/frontend/src/views/SettingsView.vue +++ b/frontend/src/views/SettingsView.vue @@ -1,5 +1,6 @@