From 389092cbb40eb7146bb7fc89b3dd47c08eee2292 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Mon, 22 Jan 2024 12:43:09 +0000 Subject: [PATCH] Option to disable auth for testing --- agenda/auth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/agenda/auth.py b/agenda/auth.py index d44696a..fc75d08 100644 --- a/agenda/auth.py +++ b/agenda/auth.py @@ -21,6 +21,9 @@ def verify_auth_token(token: str) -> str | None: def require_authentication() -> werkzeug.Response | None: """Require authentication.""" + if not flask.current_app.config.get("REQUIRE_AUTH"): + return None + token = flask.request.cookies.get("auth_token") return ( None