Change the Signup Link URL in the Auth0 New Universal Login Page Using Page Templates
Last Updated:
Overview
Auth0 officially supports updating the signup URL to point to a custom signup page only in the Classic Universal Login page using Lock. However, administrators can modify the signup link in the Auth0 New Universal Login flow by manipulating it with JavaScript using the page template functionality. When attempting to configure the New Universal Login, administrators may be unable to locate the built-in setting to update the URL for user signup.
Applies To
- Auth0
- New Universal Login
- Page Templates
Solution
What steps change the signup link URL in the Auth0 New Universal Login page?
Modify the Sign up link by manipulating it via JavaScript using the New Universal Login Page Template functionality by applying the following sample template.
<!DOCTYPE html>
{% assign resolved_dir = dir | default: "auto" %}
<html lang="{{locale}}" dir="{{resolved_dir}}">
<head>
{%- auth0:head -%}
</head>
<body>
{%- auth0:widget -%}
<script>
var signUpLink = document.querySelectorAll("a[href*='signup']")[0];
if (signUpLink) {
signUpLink.setAttribute("href", "https://example.com/signup");
}
</script>
</body>
</html>
What are the important considerations when using this workaround?
Review the following important considerations before implementing this custom JavaScript workaround.
- This is sample code and requires thorough testing before pushing to production.
- This is an unsupported customization and may break without notice.
- The Identifier First feature is unavailable when customizing the login page and changing to Classic Universal Login.