Customize New Universal Login Text Prompts

Customize New Universal Login Text Prompts

The New Universal Login Experience consists of a set of pages that perform several account-related actions such as logging in, enrolling multi-factor authentication factors, or changing their password. The text displayed on those pages is provided by Auth0 in several languages.

In some cases, you may want to modify the text on these pages to better match your application's tone or specific needs.

Auth0 provides an API that you can use to customize all the text displayed in the New Universal Login Experience for every supported language.

Prompt API call structure

The API is defined with the following structure:

PUT '/api/v2/prompts/PROMPT/custom-text/LANGUAGE',
{
  "SCREEN1": {
    "TEXT1_ID": "text1 in language"
  },
  "SCREEN2": {
    "TEXT2_ID": "text2 in language"
  }
}

Was this helpful?

/

You need to provide the proper values to the prompt, language, screen, text id fields.

Prompt values

The term prompt is used to refer to a specific step in the login flow. The available prompt values are:

Available languages

To see the list of available languages, read Universal Login Internationalization.

Prompt screens

Each prompt can have one or more screens. For example, the Login prompt has a single screen, but the Reset Password prompt has many screens.

Text IDs

Each screen has a set of text ids that are included in links to the prompts linked above.

Variables

Some screens have variables in the text that are replaced at runtime based on context information. The available variables are different for each screen, so it is not guaranteed that they will work anywhere other than the screens they originally appear in.

Variable Description
${clientName} Auth0 Application Name
${connectionName} Connection Name (e.g. Google)
${tenantName} Auth0 Tenant name
${organizationName} Name of the user’s organization if the user is authenticating in the context of an Organization
${companyName} Auth0 Tenant name, or Organization name if the user is authenticating in the context of an Organization
${userName} Name of the logged user
${email} Email of the logged user
${appName} Name of the custom Guardian Push application

Call the API

You can use the GET and PUT HTTP verbs when calling the API. To call the API you need an access token that has the read:prompts and update:prompts scopes. If you are using the API Explorer Machine to Machine application, make sure the scopes are selected.

For troubleshooting help, review Check API Calls.

Examples

You can change the description field for the login prompt from:

Log in to <%= "${companyName}" %> to continue to <%= "${clientName}" %>

Use the following API call:


curl --request PUT \
  --url 'https://YOUR_DOMAIN/api/v2/prompts/login/custom-text/en' \
  --header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \
  --header 'content-type: application/json' \
  --data '{ "login": { "description": "Login to ACME'\''s Website" } }'

Was this helpful?

/
var client = new RestClient("https://YOUR_DOMAIN/api/v2/prompts/login/custom-text/en");
var request = new RestRequest(Method.PUT);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "Bearer MGMT_API_ACCESS_TOKEN");
request.AddParameter("application/json", "{ \"login\": { \"description\": \"Login to ACME's Website\" } }", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

Was this helpful?

/
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://YOUR_DOMAIN/api/v2/prompts/login/custom-text/en"

	payload := strings.NewReader("{ \"login\": { \"description\": \"Login to ACME's Website\" } }")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("authorization", "Bearer MGMT_API_ACCESS_TOKEN")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Was this helpful?

/
HttpResponse<String> response = Unirest.put("https://YOUR_DOMAIN/api/v2/prompts/login/custom-text/en")
  .header("content-type", "application/json")
  .header("authorization", "Bearer MGMT_API_ACCESS_TOKEN")
  .body("{ \"login\": { \"description\": \"Login to ACME's Website\" } }")
  .asString();

Was this helpful?

/
var axios = require("axios").default;

var options = {
  method: 'PUT',
  url: 'https://YOUR_DOMAIN/api/v2/prompts/login/custom-text/en',
  headers: {
    'content-type': 'application/json',
    authorization: 'Bearer MGMT_API_ACCESS_TOKEN'
  },
  data: {login: {description: 'Login to ACME\'s Website'}}
};

axios.request(options).then(function (response) {
  console.log(response.data);
}).catch(function (error) {
  console.error(error);
});

Was this helpful?

/
#import <Foundation/Foundation.h>

NSDictionary *headers = @{ @"content-type": @"application/json",
                           @"authorization": @"Bearer MGMT_API_ACCESS_TOKEN" };
NSDictionary *parameters = @{ @"login": @{ @"description": @"Login to ACME's Website" } };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://YOUR_DOMAIN/api/v2/prompts/login/custom-text/en"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];

Was this helpful?

/
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://YOUR_DOMAIN/api/v2/prompts/login/custom-text/en",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{ \"login\": { \"description\": \"Login to ACME's Website\" } }",
  CURLOPT_HTTPHEADER => [
    "authorization: Bearer MGMT_API_ACCESS_TOKEN",
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Was this helpful?

/
import http.client

conn = http.client.HTTPSConnection("")

payload = "{ \"login\": { \"description\": \"Login to ACME's Website\" } }"

headers = {
    'content-type': "application/json",
    'authorization': "Bearer MGMT_API_ACCESS_TOKEN"
    }

conn.request("PUT", "/YOUR_DOMAIN/api/v2/prompts/login/custom-text/en", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Was this helpful?

/
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://YOUR_DOMAIN/api/v2/prompts/login/custom-text/en")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Bearer MGMT_API_ACCESS_TOKEN'
request.body = "{ \"login\": { \"description\": \"Login to ACME's Website\" } }"

response = http.request(request)
puts response.read_body

Was this helpful?

/
import Foundation

let headers = [
  "content-type": "application/json",
  "authorization": "Bearer MGMT_API_ACCESS_TOKEN"
]
let parameters = ["login": ["description": "Login to ACME's Website"]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://YOUR_DOMAIN/api/v2/prompts/login/custom-text/en")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()

Was this helpful?

/

To delete all custom text for the login prompt you can send an empty array:


curl --request PUT \
  --url 'https://YOUR_DOMAIN/api/v2/prompts/login/custom-text/en' \
  --header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \
  --header 'content-type: application/json' \
  --data '{ }'

Was this helpful?

/
var client = new RestClient("https://YOUR_DOMAIN/api/v2/prompts/login/custom-text/en");
var request = new RestRequest(Method.PUT);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "Bearer MGMT_API_ACCESS_TOKEN");
request.AddParameter("application/json", "{ }", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

Was this helpful?

/
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://YOUR_DOMAIN/api/v2/prompts/login/custom-text/en"

	payload := strings.NewReader("{ }")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("authorization", "Bearer MGMT_API_ACCESS_TOKEN")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Was this helpful?

/
HttpResponse<String> response = Unirest.put("https://YOUR_DOMAIN/api/v2/prompts/login/custom-text/en")
  .header("content-type", "application/json")
  .header("authorization", "Bearer MGMT_API_ACCESS_TOKEN")
  .body("{ }")
  .asString();

Was this helpful?

/
var axios = require("axios").default;

var options = {
  method: 'PUT',
  url: 'https://YOUR_DOMAIN/api/v2/prompts/login/custom-text/en',
  headers: {
    'content-type': 'application/json',
    authorization: 'Bearer MGMT_API_ACCESS_TOKEN'
  },
  data: {}
};

axios.request(options).then(function (response) {
  console.log(response.data);
}).catch(function (error) {
  console.error(error);
});

Was this helpful?

/
#import <Foundation/Foundation.h>

NSDictionary *headers = @{ @"content-type": @"application/json",
                           @"authorization": @"Bearer MGMT_API_ACCESS_TOKEN" };
NSDictionary *parameters = @{  };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://YOUR_DOMAIN/api/v2/prompts/login/custom-text/en"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];

Was this helpful?

/
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://YOUR_DOMAIN/api/v2/prompts/login/custom-text/en",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{ }",
  CURLOPT_HTTPHEADER => [
    "authorization: Bearer MGMT_API_ACCESS_TOKEN",
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Was this helpful?

/
import http.client

conn = http.client.HTTPSConnection("")

payload = "{ }"

headers = {
    'content-type': "application/json",
    'authorization': "Bearer MGMT_API_ACCESS_TOKEN"
    }

conn.request("PUT", "/YOUR_DOMAIN/api/v2/prompts/login/custom-text/en", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Was this helpful?

/
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://YOUR_DOMAIN/api/v2/prompts/login/custom-text/en")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Bearer MGMT_API_ACCESS_TOKEN'
request.body = "{ }"

response = http.request(request)
puts response.read_body

Was this helpful?

/
import Foundation

let headers = [
  "content-type": "application/json",
  "authorization": "Bearer MGMT_API_ACCESS_TOKEN"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://YOUR_DOMAIN/api/v2/prompts/login/custom-text/en")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()

Was this helpful?

/

Using the Auth0 CLI

You can use the Auth0 CLI to easily customize the Universal Login prompts text.

You can use the following commands:

auth0 branding texts update <prompt> [-l <language>] auth0 branding texts show <prompt> [-l <language>]

The language defaults to English, you can find the possible language values here.  For example, if you run the command below 

auth0 branding texts update login 

The Auth0 CLI will open the default editor with all the texts for the login prompt, in English:

After you exit the editor, the CLI will save the values.

Running the auth0 branding texts show login command will list the existing values:

{
    "login": {
        "alertListTitle": "Alerts",
        "buttonText": "Continue",
        "description": "Log in to ${companyName} to continue to ${clientName}.",
        "editEmailText": "Edit",
        "emailPlaceholder": "Email address",
        "federatedConnectionButtonText": "Continue with YOUR_CONNECTION_NAME",
        "footerLinkText": "Sign up",
        "footerText": "Don't have an account?",
        "forgotPasswordText": "Forgot password?",
        "invitationDescription": "Log in to accept ${inviterName}'s invitation to join ${companyName} on ${clientName}.",
        "invitationTitle": "You've Been Invited!",
        "logoAltText": "${companyName}",
        "pageTitle": "Log in | ${clientName}",
        "passwordPlaceholder": "Password",
        "separatorText": "Or",
        "signupActionLinkText": "${footerLinkText}",
        "signupActionText": "${footerText}",
        "title": "Welcome",
        "usernamePlaceholder": "Username or email address"
    }
}

Was this helpful?

/

Learn more