Customizing the Classic Hosted Login Page via Management API / Terraform

Problem Statement:

How to customize my login page (classic experience) outside of the dashboard


The Classic Universal Login page can be customized via the Global Client for the tenant. The Global Client ID can be found in tenant settings > advanced > Global Client Information.
This is what the Deploy CLI uses behind the scene when managing the custom login page.

So using the PATCH clients endpoint for the global client ID, two fields needs to be set:

  • custom_login_page_on - (boolean, true = custom login page is enabled)
  • custom_login_page - (where the HTML should be stored - will need ["] characters and new line characters escaped to be compatible with JSON format)

The same parameters need to be used with Terraform. Please see Terraform docs for updating clients here:

We can also set a custom login page on a per application basis by enabling the custom login page on normal client IDs and providing the desired HTML to override the Global client settings.

Here is a Gist with a sample HTML for quick testing:

1 Like