Skip to content

Commit 99234eb

Browse files
committed
fix: let the platform decide to how login the users
We force users to go to authentication mfe for login/registration and prevent the login behaviour tweaks l ike having THIRD_PARTY_AUTH_HINT in your site configuration which redirect users to a TPA when they visit /login.
1 parent 8d68dd3 commit 99234eb

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

lms/templates/header/navbar-not-authenticated.html

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
from django.conf import settings
1010
from django.urls import reverse
1111
from django.utils.translation import gettext as _
12-
13-
from openedx.core.djangoapps.user_authn.toggles import should_redirect_to_authn_microfrontend
1412
%>
1513

1614
<%
@@ -19,7 +17,6 @@
1917
allows_login = not settings.FEATURES['DISABLE_LOGIN_BUTTON'] and not combined_login_and_register
2018
can_discover_courses = settings.FEATURES.get('ENABLE_COURSE_DISCOVERY')
2119
allow_public_account_creation = static.get_value('ALLOW_PUBLIC_ACCOUNT_CREATION', settings.FEATURES.get('ALLOW_PUBLIC_ACCOUNT_CREATION')) and settings.FEATURES.get('SHOW_REGISTRATION_LINKS', True)
22-
should_redirect_to_authn_mfe = should_redirect_to_authn_microfrontend()
2320
%>
2421
<nav class="nav-links" aria-label=${_("Supplemental Links")}>
2522
<div class="main">
@@ -48,25 +45,13 @@
4845
<div>
4946
% if allows_login:
5047
% if allow_public_account_creation and not disable_register_button:
51-
% if should_redirect_to_authn_mfe:
52-
<div class="mobile-nav-item hidden-mobile nav-item">
53-
<a class="register-btn btn" href="${settings.AUTHN_MICROFRONTEND_URL}/register${login_query()}">${_("Register for free")}</a>
54-
</div>
55-
% else:
56-
<div class="mobile-nav-item hidden-mobile nav-item">
57-
<a class="register-btn btn" href="/register${login_query()}">${_("Register for free")}</a>
58-
</div>
59-
% endif
60-
% endif
61-
% if should_redirect_to_authn_mfe:
62-
<div class="mobile-nav-item hidden-mobile nav-item">
63-
<a class="sign-in-btn btn" href="${settings.AUTHN_MICROFRONTEND_URL}/login${login_query()}">${_("Sign in")}</a>
64-
</div>
65-
% else:
6648
<div class="mobile-nav-item hidden-mobile nav-item">
67-
<a class="sign-in-btn btn" href="/login${login_query()}">${_("Sign in")}</a>
49+
<a class="register-btn btn" href="/register${login_query()}">${_("Register for free")}</a>
6850
</div>
6951
% endif
52+
<div class="mobile-nav-item hidden-mobile nav-item">
53+
<a class="sign-in-btn btn" href="/login${login_query()}">${_("Sign in")}</a>
54+
</div>
7055
% endif
7156
</div>
7257
</div>

0 commit comments

Comments
 (0)