Auth0 Home Blog Docs

Update Custom Login via Management API

Hello,

Looking through the Management API v2, I noticed the Patch Tenant Settings endpoint allows you to update the error_page, change_password, and guardian_mfa_page, but not the login_page itself. Updating the login page is supported via GitHub Deployment so I would expect the API to support it as well.

Am I missing something? Or is there another way to update the login page via the management API?

Hey there @ryanburr!

Can you specify a little bit more what exact action would you like to make to update the login page? What kind of improvement you mean?

@konrad.sopala, I would like to make an addition to the Tenant Settings API to be able to patch the /api/v2/tenants/settings endpoint with a new field login_page in order to update the HTML for the custom universal login page. The following would be an example of what the body of the request would look like…

{
  "login_page": {
    "enabled": true,
    "html": ""
  }
}

Update. The Patch Client API (/api/v2/clients/{id}) has the following fields in it…

{
  "custom_login_page_on": true,
  "custom_login_page": "<div/>",
  "custom_login_page_preview": "<div/>"
}

This will update the login page for a client (application). This does NOT update the Universal Login page for my tenant. At this point, turning on Universal Login for my tenant does NOT override the custom_login_page I set for a client. There is also no way to know through the Dashboard if a custom login page is set for a client. So the question still stands…

  1. Is there a way to update the Universal Login page through the management API?
  2. Is the custom_login_page feature of the client API a deprecated feature?

Second Update. After checking out what API the Dashboard is using to save the Universal Login page, I noticed it is using the /api/v2/clients/{id} where id is the Global Client ID for your tenant with a payload similar to what was mentioned in the above post. This Client ID can be found under “Settings -> Advance -> Global Client Information”. A quote from that section…

The global client ID and secret are used to generate tokens for legacy Auth0 APIs. Typically, you will not need these values. If you need to have the global client secret changed, please contact support.

This still seems like a legacy API. Are there plans to move this to the Tenant Settings API?

1 Like