- Security Warning:When disabling password login, you become responsible for securing DockFlare access. Best practice is to use a Cloudflare Tunnel with an Access Policy and ensure Docker ports are not exposed, preventing access from the local network (LAN).
+ Security Warning: When disabling password login, you become responsible for securing DockFlare access. Best practice is to use a Cloudflare Tunnel with an Access Policy and ensure Docker ports are not exposed, preventing access from the local network (LAN).
diff --git a/dockflare/app/web/auth_routes.py b/dockflare/app/web/auth_routes.py
index e0b2b8b..0a3c854 100644
--- a/dockflare/app/web/auth_routes.py
+++ b/dockflare/app/web/auth_routes.py
@@ -18,9 +18,7 @@ class LoginForm(FlaskForm):
def login():
"""Handles the user login process."""
if current_app.config.get('DISABLE_PASSWORD_LOGIN'):
- flash('Password login is disabled. Please use an alternative login method.', 'warning')
- # Still render a basic page, but without the form.
- return render_template('auth/login_disabled.html', title="Login Disabled")
+ return redirect(url_for('web.status_page'))
if current_user.is_authenticated:
return redirect(url_for('web.status_page'))
diff --git a/dockflare/app/web/forms.py b/dockflare/app/web/forms.py
index aa9900f..fb448e7 100644
--- a/dockflare/app/web/forms.py
+++ b/dockflare/app/web/forms.py
@@ -15,7 +15,7 @@
# along with this program. If not, see .
# app/web/forms.py
from flask_wtf import FlaskForm
-from wtforms import PasswordField, SubmitField, StringField, IntegerField, BooleanField
+from wtforms import BooleanField, PasswordField, SubmitField, StringField, IntegerField
from wtforms.validators import DataRequired, EqualTo, Length, Optional
class SettingsForm(FlaskForm):
diff --git a/dockflare/app/web/routes.py b/dockflare/app/web/routes.py
index 3f575ad..71818e3 100644
--- a/dockflare/app/web/routes.py
+++ b/dockflare/app/web/routes.py
@@ -102,6 +102,9 @@ def gating_logic():
if hasattr(current_app, 'login_manager'):
+ if current_app.config.get('DISABLE_PASSWORD_LOGIN'):
+ return
+
if not current_user.is_authenticated:
if request.endpoint and not request.endpoint.startswith('auth.') and request.endpoint != 'static':