How to manipulate the DOM in the Auth0 Lock hosted login page.
- Copy and paste the HTML to your Hosted login page configuration.
- Insert custom text into the login page using code below:
ready('DOM_ELEMENT_SELECTOR', function (element) {
let loginTextElement = document.createElement('p');
loginTextElement.innerText = "CUSTOM_TEXT";
parentNode.parentNode.insertBefore(loginTextElement, parentNode.nextSibling);
});
DOM_ELEMENT_SELECTOR
: Any CSS Selector from the Lock DOM that you wish to insert your custom text after.CUSTOM_TEXT
: The text that will be displayed.