diff --git a/openedx/core/djangoapps/user_authn/views/login.py b/openedx/core/djangoapps/user_authn/views/login.py index 472790859e4c..9eb81f369de0 100644 --- a/openedx/core/djangoapps/user_authn/views/login.py +++ b/openedx/core/djangoapps/user_authn/views/login.py @@ -129,7 +129,7 @@ def _get_user_by_email_or_username(request, api_version): login_fields = ['email', 'password'] if is_api_v2: login_fields = ['email_or_username', 'password'] - if request.POST.get('is_nafath_user', False): + if request.POST.get('is_nafath_user', False) and request.POST.get('trans_id', ""): login_fields.remove('password') if any(f not in request.POST.keys() for f in login_fields): @@ -241,7 +241,7 @@ def _authenticate_first_party(request, unauthenticated_user, third_party_auth_re if not third_party_auth_requested: _check_user_auth_flow(request.site, unauthenticated_user) - if request.POST.get('is_nafath_user', False): + if request.POST.get('is_nafath_user', False) and request.POST.get('trans_id', ""): return authenticate( username=username, request=request