---
title: "SDK: Custom Login Page"
slug: "sdk-custom-login-page"
updated: 2024-08-09T18:56:50Z
published: 2024-08-09T18:56:50Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK: Custom Login Page

## Overview

The SDK allows users to customize Designer Elements. It also allows users to modify the default Portal login Page with custom styles and designs. Users can integrate the login page according to their preferences, allowing them to incorporate SAML, OpenID, or any other desired authentication method. For more information, refer to [Software Development Kit (SDK) Overview](https://documentation.decisions.com/v9/docs/sdk-overview).

Note:

- Decisions will not support or assist in developing the Custom Login Page. The customization process for the login page remains the responsibility of the customers. However, to seek assistance solely for deploying/configuring, contact [support@decisions.com](mailto:support@decisions.com).
- Once the application is configured with a Custom Login Page, it will override the [Dual Authentication Settings](https://documentation.decisions.com/v9/docs/login-page-settings). As a result, only the Custom Login Page will be loaded for the login, disregarding the Dual Authentication Settings.
- **Breaking Changes for v8.15:**  
Customers who are upgrading to Decisions Version 8.15 should be aware that Custom Modules have transitioned from Module.Build.xml to Module.Build.json. As a result, it is necessary to perform a rebuild of their Custom Module. For more information, refer to [SDK: Building a Module (Advanced)](https://documentation.decisions.com/v9/docs/building-module-advanced).

### Prerequisite:

- [Create a Module with SDK](/v9/docs/building-module-advanced)
- Download the pre-built module below referenced in this article:[Decisions.CustomLogin.Web(1).zip](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/Decisions.CustomLogin.Web(1).zip)

---

## Configuration

1. Navigate to the [SDK Examples](https://github.com/decisions-com/sdk-examples/tree/master) on Github to check out the [Decisions.CustomLogin.Example](https://github.com/decisions-com/sdk-examples/tree/master/Decisions.CustomLogin.Example) project.
2. Open folder Decisions.CustomLogin.Web and open the [Decisions.CustomLogin.web.csproj](https://github.com/decisions-com/sdk-examples/blob/master/Decisions.CustomLogin.Example/Decisions.CustomLogin.Web/Decisions.CustomLogin.Web.csproj) in an IDE.
3. Navigate to Decisions.CustomLogin.Example/Decisions.CustomLogin.Web/Controllers and open [CustomLoginController.cs](https://github.com/decisions-com/sdk-examples/blob/master/Decisions.CustomLogin.Example/Decisions.CustomLogin.Web/Controllers/CustomLoginController.cs). This login controller example includes the following:

```csharp
using Decisions.Web.Core.CustomLogin;
using Decisions.Web.Core.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace Decisions.UnitTests.Web.Core.Controllers
{
    public class CustomLoginController : Controller, ICustomLoginPageProvider
    {
        public string LoginLayoutPath { get => "~/VIEWS/CUSTOMLOGIN/CUSTOMLOGINLAYOUT.CSHTML"; set { } }

        [AllowAnonymous]
        public IActionResult RedirectToCustomLogin(LoginViewModel loginViewModel)
        {
            return View("CustomLogin", loginViewModel);
        }
    }
}
```
  1. The login controller must extend **Controller**and implement **CustomerLoginPageProvider**.
  2. The String variable **LoginLayoutPath**refers to the customized login page layout file **CustomLoginLayout.cshtml** that is created under the **Views**folder.
  3. The **RedirectToCustomLogin**method directs the user to the custom-styled page **CustomLogin.cshtml** in the Views folder. This method triggers when the user logs out or navigates to log into the environment.
4. Navigate to **[Custom Login Module Example]\Decisions.CustomLogin.Example\Decisions.CustomLogin.Web\** and open the **Module.Build.xml**file. This file includes references to two MVC .dlls: the project and Views.  
![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1685093056036.png)
5. Below is how the Custom Login Page example will be displayed to a user logging in.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1692617029687.png)

---

## Important Considerations

When using a custom layout in `CustomLogin.cshtml`, there are a couple of mandatory sections that need to be rendered or ignored.

To Render:

```csharp
@RenderSection("loginmodal", false)

@RenderSection("loginfooter", false)
```

To Ignore it:

```csharp
@{

    IgnoreSection("loginfooter");

    IgnoreSection("loginmodal");

}
```

---

For further information on SDK, visit the [Decisions Forum](https://community.decisions.com/categories/SDK).
