Auth0 Login Page Hangs After Missed CAPTCHA Verification
Last Updated:
Overview
The Auth0 login page hangs indefinitely when a user attempts to submit credentials after initially missing the CAPTCHA verification. Resolve this issue by modifying the page template using the Auth0 Command Line Interface (CLI) to include a script that stops event propagation. When a user enters a username and password without checking the "I'm not a robot" CAPTCHA box and clicks submit, the page displays the expected error message Select the checkbox to verify you are not a robot. However, if the user then checks the box while leaving the credentials filled in and clicks submit again, the page hangs indefinitely and fails to redirect to the application.
Applies To
- Auth0
- Universal Login
- CAPTCHA
- Attack Protection
Cause
The page hangs upon form resubmission after an initial CAPTCHA validation failure.
Solution
How is the page hang resolved?
Modify the page template using the Auth0 CLI to add a script to the <head> section that stops immediate event propagation, or refresh the page to bypass the hang.
- Open the Auth0 CLI.
- Modify the Universal Login page template to include the following script within the
<head>tags:<head> <script> window.addEventListener('submit', function (event) { // Stop all subsequent event listeners from executing on this event event.stopImmediatePropagation(); }, true); </script> </head>
- Save and deploy the updated template.
- Alternatively, instruct the user to refresh the login page and ensure the CAPTCHA box is checked before submitting credentials on the first attempt.