Hide the Sign Up Link Conditionally when Using the New Universal Login

Overview

This article clarifies whether the sign-up link can be hidden conditionally when using the New Universal Login.

Applies To

  • Custom Parameter: Use a custom parameter in the URL or request.
  • Conditional Logic: Based on the value of this custom parameter, conditionally hide the sign-up link.

Solution

There is no out-of-the-box way of conditionally hiding the Sign Up link on the New Universal Login page. However, it may still be doable with custom domain and page templates, but there is a caveat.

Pass the custom parameter on the /authorize request (any custom parameters must use an “ext-” prefix), e.g.,

Pick up the custom param on the page template e.g.

<script>
        var param = {{ transaction.params.ext-hideSignUp }}
        ...

Add some JavaScript to pick up the Sign Up element and hide it conditionally with an if statement using the custom parameter. Sample variation of this:

<script>
    ...
    var xpath = \"//a[text()='Sign up']\";
    var matchingElement = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;matchingElement.remove()
</script>

NOTE:

  • The structure of the New Universal Login page may change in the future, which could break any custom implementations, as mentioned above.
  • The best course of action is to log some product feedback requesting the said functionality.