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