Custom partial is not displayed

I need to customize Sign Up page by adding new fields. For this I configured partials for a signup prompt via API request to PUT /api/v2/prompts/signup/partials with body:
{
“signup”: {
“form-content-start”: “<div class="ulp-field"><label for="first-name">First Name<input type="text" name="ulp-first-name" id="first-name">”
}
}

Response status was 200 OK and also endpoint GET /api/v2/prompts/signup/partials returns my partial. But when I go to Sign Up page, my new field is not displayed there.

All Prerequisites are completed:

  • Universal Login is used
  • custom domain is configured
  • template for New Universal Login is added
  • option ‘Customize Login Page’ is disabled
  • I use /authorize endpoint to open Sign Up page (NOT database ‘Try’ button)

Why my new field is not displayed on Sign Up page?

P.S. I cannot use Forms as I need custom fields to be set right during registration (not afterwards)

Hi @lyic,

In your provided JSON body, the HTML snippet is missing closing tags:

<div class="ulp-field">
    <label for="first-name"> First Name
    <input type="text" name="ulp-first-name" id="first-name">

It should be

<div class="ulp-field">
    <label for="first-name"> First Name </label>
    <input type="text" name="ulp-first-name" id="first-name">
</div>

You can check some examples of partials on the official docs:

If you have any further questions, please don’t hesitate to reach out.

Have a good one,
Vlad

Hello, thank you for the quick reply!

Seems I just pasted body here incorrectly.
Response that is returned by GET /api/v2/prompts/signup/partials contains a valid JSON with valid HTML. So it’s not the issue

Hi again @lyic,

In the documentation, it says that one of the other criterias for prompts to work is to have a custom page template set up as well.

Check if you have one set up by calling the Get template for New Universal Login Experience endpoint.

If it returns a 404 error saying “Template doesn’t exist.”, then you’ll need to set one up.

Call the Set template for New Universal Login Experience endpoint with the following body:

{
  "template": "<!DOCTYPE html><head>{%- auth0:head -%}</head><body class=\"_widget-auto-layout\">{%- auth0:widget -%}</body></html>"
}

This is the default unmodified Universal Login template.

Let us know if this fixes the issue.

Have a good one,
Vlad

Hello @vlad.murarasu ,

I already had Universal Login template set. But I anyway tried to delete it and set again with the body you provided. Unfortunately, it didn’t help.

I also tried to simplify the partial itself by setting it as:
{
“signup”: {
“form-content-start”: "<p>Test text</p>"
}
}
But the partial is still not displayed on sign up page

Hi again @vlad.murarasu ,

Finally I found the issue. Authorization flow was initiated using the tenant’s canonical domain instead of the configured custom domain.

For me it was unclear from the docs that I need to change url to custom domain to have customizations applied. Better to explicitly mention it there.

Thank you anyway for the help!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.