From d62643312a99f11266b0a2fa45f5d578bccd42e3 Mon Sep 17 00:00:00 2001 From: giles Date: Sat, 28 Feb 2026 20:24:07 +0000 Subject: [PATCH] Skip OAuth/auth for test service (public dashboard) Co-Authored-By: Claude Opus 4.6 --- shared/infrastructure/factory.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/shared/infrastructure/factory.py b/shared/infrastructure/factory.py index 4248340..61c4788 100644 --- a/shared/infrastructure/factory.py +++ b/shared/infrastructure/factory.py @@ -125,8 +125,9 @@ def create_base_app( errors(app) # Auto-register OAuth client blueprint for non-account apps - # (account is the OAuth authorization server) - if name != "account": + # (account is the OAuth authorization server; test is a public dashboard) + _NO_OAUTH = {"account", "test"} + if name not in _NO_OAUTH: from shared.infrastructure.oauth import create_oauth_blueprint app.register_blueprint(create_oauth_blueprint(name)) @@ -173,7 +174,7 @@ def create_base_app( # Auth state check via grant verification + silent OAuth handshake # MUST run before _load_user so stale sessions are cleared first - if name != "account": + if name not in _NO_OAUTH: @app.before_request async def _check_auth_state(): from quart import session as qs