From 547a6cd9231ba1f2672002390bc9f9006a5ff187 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Wed, 3 Dec 2025 23:17:02 +0000 Subject: [PATCH] Make auth/admin apps API calls use apiFetch, a new function that asks for permission by iframe if needed. Implement max-age checks for API authz.verify as well along with a custom exception type that carries metadata. --- frontend/auth/App.vue | 16 +- frontend/auth/admin/AdminApp.vue | 73 +++----- frontend/src/admin/AdminUserDetail.vue | 26 +-- frontend/src/components/ProfileView.vue | 8 +- .../src/components/RegistrationLinkModal.vue | 8 +- frontend/src/stores/auth.js | 36 ++-- frontend/src/utils/api.js | 163 ++++++++++++++++++ passkey/db/__init__.py | 1 + passkey/db/sql.py | 14 +- passkey/fastapi/admin.py | 52 +++++- passkey/fastapi/api.py | 63 +++++-- passkey/fastapi/authz.py | 2 +- passkey/fastapi/user.py | 51 +++++- passkey/fastapi/ws.py | 25 ++- passkey/util/sessionutil.py | 20 ++- 15 files changed, 411 insertions(+), 147 deletions(-) create mode 100644 frontend/src/utils/api.js diff --git a/frontend/auth/App.vue b/frontend/auth/App.vue index 4494bce..4abc56a 100644 --- a/frontend/auth/App.vue +++ b/frontend/auth/App.vue @@ -10,7 +10,7 @@