From 87e1443e7d10bc8727f339d5c4e00fdc7b2eca33 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Wed, 4 Feb 2026 20:35:29 +0000 Subject: [PATCH] Auth restricted endpoint is picky about the trailing slash, use it consistently. --- cista/auth.py | 4 ++-- frontend/src/components/HeaderMain.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cista/auth.py b/cista/auth.py index 7f1961a..f558cd0 100644 --- a/cista/auth.py +++ b/cista/auth.py @@ -269,7 +269,7 @@ async def verify(request, *, privileged=False): raise Unauthorized( f"Login required for {request.path}", "cookie", - context={"auth": {"iframe": "/auth/restricted"}}, + context={"auth": {"iframe": "/auth/restricted/"}}, quiet=True, ) @@ -278,7 +278,7 @@ async def verify(request, *, privileged=False): bp = Blueprint("auth", url_prefix="/auth") -@bp.get("/restricted") +@bp.get("/restricted/") async def login_page(request): """Login page that works both standalone and in paskia iframe.""" s = session.get(request) diff --git a/frontend/src/components/HeaderMain.vue b/frontend/src/components/HeaderMain.vue index c34dc83..663bff0 100644 --- a/frontend/src/components/HeaderMain.vue +++ b/frontend/src/components/HeaderMain.vue @@ -115,7 +115,7 @@ const settingsMenu = (e: Event) => { // Show login option only in public mode (non-public modes trigger auth automatically) items.push({ label: '🔐 Login', onClick: async () => { try { - await showAuthIframe('/auth/restricted#theme=light') + await showAuthIframe('/auth/restricted/#theme=light') resumeWatching() } catch (e) { console.log('Login cancelled')