diff --git a/mlflow_oidc_auth/hooks/before_request.py b/mlflow_oidc_auth/hooks/before_request.py index 1d76d5b..a3d9ac0 100644 --- a/mlflow_oidc_auth/hooks/before_request.py +++ b/mlflow_oidc_auth/hooks/before_request.py @@ -196,7 +196,7 @@ def before_request_hook(): if session.get("username") is None: session.clear() - if config.ENABLE_AUTOMATIC_LOGIN_REDIRECT: + if config.AUTOMATIC_LOGIN_REDIRECT: return redirect(url_for("login", _external=True)) return render_template( "auth.html", diff --git a/mlflow_oidc_auth/views/authentication.py b/mlflow_oidc_auth/views/authentication.py index 0e217a3..bd96eb3 100644 --- a/mlflow_oidc_auth/views/authentication.py +++ b/mlflow_oidc_auth/views/authentication.py @@ -17,7 +17,7 @@ def login(): def logout(): session.clear() - if config.ENABLE_AUTOMATIC_LOGIN_REDIRECT: + if config.AUTOMATIC_LOGIN_REDIRECT: return render_template( "auth.html", username=None,