Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IAMRISK-3554] hcaptcha bug fix #2566

Merged
merged 4 commits into from
Jun 26, 2024

Conversation

Treterten
Copy link
Contributor

@Treterten Treterten commented Jun 14, 2024

Changes

There's an issue with hcaptcha dissapearing and not reloading. There's a related thread here that goes more in depth into the problem. The fix involves resetting the window.hcaptcha variable to force a reload.

References

Ticket

Testing

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of the platform/language

Checklist

@@ -302,7 +302,7 @@ export class ThirdPartyCaptcha extends React.Component {
: `auth0-lock-${providerDomPrefix(this.props.provider)}-block auth0-lock-${providerDomPrefix(this.props.provider)}-block-error`
}
>
<div className={`auth0-lock-${providerDomPrefix(this.props.provider) === 'recaptcha' ? 'recaptchav2' : providerDomPrefix(this.props.provider)}`} ref={this.ref} />
<div className={`auth0-lock-${providerDomPrefix(this.props.provider) === 'recaptcha' ? 'recaptchav2' : providerDomPrefix(this.props.provider)}`} id={this.props.provider === HCAPTCHA_PROVIDER ? 'h-captcha' : ''} ref={this.ref} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Really starting to dislike the second ternary operator (starting to get significantly more difficult to follow and reason about). Any considerations for isolating this to a function the same way we did with providerDomPrefix?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can do that- I think that will make it easier to follow 👍

@nandan-bhat nandan-bhat merged commit 70c1872 into auth0:master Jun 26, 2024
5 checks passed
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