Use a custom SXA login page

Abstract

Assign a custom login page.

If you create a custom login page for a specific SXA site, you can assign this page to be the login page. To prevent the default Sitecore controller redirecting you to the default Sitecore login page, you must use a specific security controller.

To assign a custom SXA login page:

  1. Navigate to /sitecore/content/Folder/Tenant/Site/Settings/Site Grouping/Site Definition and in the Login Page field, select your login page.

    A215848AC8984AFFB5393E42F21186FC.png
  2. In the Login section, select the Require Login check box.

  3. To overrule the default Sitecore controller that checks if you need to be redirected to the default Sitecore login page, navigate to your login page and in the Layout section add the following:

    • In the Controller field: Sitecore.XA.Feature.Security.Controllers.LoginPageController,Sitecore.XA.Feature.Security

    • In the Controller action field: IndexForLogin

    E4CCF81A4B03474CBADDBA7F084BE46D.png