Skip to content

Conversation

@amitsingh05667
Copy link
Contributor


Title

Fix renderPasswordlessCaptcha check in render function to handle undefined challenge


Description

This PR fixes an issue in the render function of captcha.js where the code did not handle cases when the challenge object was undefined.

Previously, the function only checked for challenge.required, which could cause runtime errors if challenge itself was undefined.
The updated logic now safely checks for both challenge existence and the required property.

Changes

  • Updated condition in renderPasswordlessCaptcha to handle undefined challenge.
  • Prevented potential runtime error when challenge is missing.
  • Ensures consistent behavior when captcha is not required.

Testing

  • Verified rendering with and without captcha challenge.
  • Confirmed no regression in normal passwordless flow.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation update


@amitsingh05667 amitsingh05667 requested a review from a team as a code owner October 31, 2025 10:07
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.

2 participants