Application name customisation in New Universal Login pages

:wave:

I’m in the process of migrating from Classic Universal Login to the New Universal Login.

My goal is to change the displayed application name. Previously we used JS to change the name in Classic mode, but now need the same functionality in New mode.

My current plan would be something like:

<!DOCTYPE html><html>
<!-- if we change liquid variables here, will it make it into auth0:widget? -->
{% if application.name == "example_name" %}
{% assign application.name = "Better name" %}
{% endif %}
  <head>
    {%- auth0:head -%}
  </head>
  <body>
    {%- auth0:widget -%}
  </body></html>

Hi @sorx14 ,

Welcome to the Auth0 Community!

To change the application name in your login page, you can hard code it instead of calling application.name. For example, sending the

PUT https://{{auth0_domain}}/api/v2/prompts/login/custom-text/en request with the body script

{
    "login":{
        "description":"Log in to Better name"
    }

}

Hope other folks in our community could come up with better solutions!

Thanks @lihua.zhang

Unfortunately there are multiple applications on this tenant with different application ‘display name’ requirements. The transform is the same for each, but I can’t hardcode the application string itself. The original naming convention used underscores to segment application location/team etc.

Can the /prompts endpoint accept Liquid variables in their content? That way I could do something similar to:

{
    "login": {
         "description": "Log in to {% custom_app_name %}"
    }
}

And then in the template:

<!DOCTYPE html><html>
{% assign custom_app_name = application.name | split: "_" | last %}
  <head>
    {%- auth0:head -%}
  </head>
  <body>
    {%- auth0:widget -%}
  </body></html>