Skip to content

fix(captcha): call done() after widget reset on reload for recaptcha_… - #1683

Closed
josh-cain wants to merge 1 commit into
auth0:masterfrom
josh-cain:fix/recaptcha-v2-reload-done-callback
Closed

fix(captcha): call done() after widget reset on reload for recaptcha_…#1683
josh-cain wants to merge 1 commit into
auth0:masterfrom
josh-cain:fix/recaptcha-v2-reload-done-callback

Conversation

@josh-cain

@josh-cain josh-cain commented Jul 27, 2026

Copy link
Copy Markdown

When handleCaptchaProvider takes the early-return paths (widgetId already set, or auth0FCInstance already exists), it resets the widget and returns without calling done(). The ULP form submit handler is gated on done() being invoked, so after a failed first attempt the captcha widget is re-rendered but the form stays permanently blocked — the user solves the captcha but nothing happens.

Call done() before returning in the widgetId and friendly_captcha reset branches. Arkose is intentionally excluded: its done() is fired asynchronously from the onReady callback after arkose.run(), not synchronously on reset.

Changes

(See diff, ask Claude if you're unsure how to read it)

References

Please include relevant links supporting this change such as a:

  • support ticket
  • community post
  • StackOverflow post
  • support forum thread

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

  • This change adds unit test coverage
  • This change adds integration test coverage

Checklist

@josh-cain
josh-cain requested a review from a team as a code owner July 27, 2026 20:44
@josh-cain
josh-cain force-pushed the fix/recaptcha-v2-reload-done-callback branch from c2865fd to e2d718b Compare July 27, 2026 21:14
…tcha

When handleCaptchaProvider takes the early-return paths (widgetId already
set, or auth0FCInstance already exists), it resets the widget and returns
without calling done(). The ULP form submit handler is gated on done() being
invoked, so after a failed first attempt the captcha widget is re-rendered
but the form stays permanently blocked — the user solves the captcha but
nothing happens.

Call done() before returning in the widgetId and friendly_captcha reset
branches. Arkose is intentionally excluded: its done() is fired
asynchronously from the onReady callback after arkose.run(), not
synchronously on reset.

Fixes: ESD-64095, ESD-64472

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@josh-cain
josh-cain force-pushed the fix/recaptcha-v2-reload-done-callback branch from e2d718b to e47a4e8 Compare July 27, 2026 21:18
@josh-cain josh-cain closed this Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant