From 39ed0fbde5a0818ba1e771456b0a53eaea36b3a2 Mon Sep 17 00:00:00 2001
From: Emad Rad <codewithemad@gmail.com>
Date: Wed, 12 Jun 2024 12:03:17 +0330
Subject: [PATCH] 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 like having THIRD_PARTY_AUTH_HINT in your site configuration which redirect users to a TPA when they visit /login.

Close #87
---
 .../header/navbar-not-authenticated.html       | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/tutorindigo/templates/indigo/lms/templates/header/navbar-not-authenticated.html b/tutorindigo/templates/indigo/lms/templates/header/navbar-not-authenticated.html
index 87730c676..85850b246 100644
--- a/tutorindigo/templates/indigo/lms/templates/header/navbar-not-authenticated.html
+++ b/tutorindigo/templates/indigo/lms/templates/header/navbar-not-authenticated.html
@@ -48,25 +48,13 @@
   <div class="secondary">
     <div class="btn-holder">
       % if allows_login:
+        <div class="mobile-nav-item hidden-mobile nav-item">
+            <a class="sign-in-btn btn" href="/login${login_query()}">${_("Sign in")}</a>
+        </div>
         % if allow_public_account_creation and not disable_register_button:
-          % if should_redirect_to_authn_mfe:
-            <div class="mobile-nav-item hidden-mobile nav-item">
-                <a class="register-btn btn" href="${settings.AUTHN_MICROFRONTEND_URL}/register${login_query()}">${_("Register for free")}</a>
-            </div>
-          % else:
             <div class="mobile-nav-item hidden-mobile nav-item">
                 <a class="register-btn btn" href="/register${login_query()}">${_("Register for free")}</a>
             </div>
-          % endif
-        % endif
-        % if should_redirect_to_authn_mfe:
-          <div class="mobile-nav-item hidden-mobile nav-item">
-              <a class="sign-in-btn btn" href="${settings.AUTHN_MICROFRONTEND_URL}/login${login_query()}">${_("Sign in")}</a>
-          </div>
-        % else:
-          <div class="mobile-nav-item hidden-mobile nav-item">
-              <a class="sign-in-btn btn" href="/login${login_query()}">${_("Sign in")}</a>
-          </div>
         % endif
       % endif
     </div>