Update web/core/views.py
This commit is contained in:
parent
2b6a8820e0
commit
3041786644
@ -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")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user