Skip to content

Conversation

@amitsingh05667
Copy link
Contributor


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:44
Copy link
Contributor

@subhankarmaiti subhankarmaiti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amitsingh05667 please check comment

@amitsingh05667 amitsingh05667 merged commit bbd5c27 into master Oct 31, 2025
11 checks passed
@amitsingh05667 amitsingh05667 deleted the fix/SDK-6999-render-passwordless-captcha branch October 31, 2025 12:00
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.

3 participants