Use a custom SXA login page

Current version: 9.3

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.

    Assign a custom login page.
  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

Do you have some feedback for us?

If you have suggestions for improving this article,