diff --git a/web/core/views.py b/web/core/views.py index f738e8a..33d8c71 100644 --- a/web/core/views.py +++ b/web/core/views.py @@ -58,17 +58,13 @@ def login_view(request): if request.user.is_authenticated: return redirect("search") - # IMPORTANT: - # Only auto-initiate OIDC on a *direct* visit to /login/ - # Never during the OIDC callback flow - if ( - request.method == "GET" - and not request.path.startswith("/oidc/") - ): + # Auto-initiate OIDC only for direct /login access + if request.method == "GET" and request.path == "/login/": return redirect("oidc_authentication_init") - # Local login fallback (optional) ctx = {} + + # Optional local login fallback if request.method == "POST": u = request.POST.get("username") p = request.POST.get("password")