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