We are using Auth0 at Oblong Industries and are happy with it thus far!
We are looking to version control our Universal Login page, and found articles related to versioning with Gitlab, Github and a few more (Login Page Version Control), but we use Terraform for a lot of our deployment in the cloud.
We are wondering if there is an API endpoint to load in HTML templates for Universal logins by Tenancy. It looks like one can PATCH changes to the ācolorsā associated with the tenancy, but not actually change the HTML file template.
Is there support for this out there? Are we missing some documentation pages?
Yep so I checked both our APIs and the only option you have regarding universal login is the endpoint you mentioned: Auth0 Management API v2
What you require is not doable with single API endpoint however you can always relay that feedback providing as much context as possible to our product team directly via our feedback site:
The universal login page is actually controlled under the Tenantās Global Client. You can get the Global Client Id from the Tenant Settings ā āAdvancedā tab.
NOTE: Do not modify any other settings in the Global Client or you will risk breaking your tenant and potentially losing access to the tenant. The following process should only be used for modifying the contents of the Universal Login page.
Since you mentioned you are using the Terraform provider here is how you would update the page.
Create a Terraform āauth0_clientā resource to hold the html:
resource "auth0_client" "global_client" {
name = "All Applications"
is_first_party = true
custom_login_page_on = true
custom_login_page = "<!DOCTYPE html>\n<html>\nSOME MORE HTML</html>\n"
}
Import the Global Client into your Terraform State so you can update the Universal Login page: terraform import auth0_client.global_client THE_GLOBAL_CLIENT_ID
Now you should be able to do a terraform apply and the changes will get made.
One other IMPORTANT note: Once you add the Global Client to your Terraform state you canāt destroy it.
You will get an error similar to:
auth0_client.global_client: Destroying... [id=THE_GLOBAL_CLIENT_ID]Error: 400 Bad Request: Global client cannot be deleted