Skip to content

Commit

Permalink
[IAMRISK-3591] Remove BYPASS_CAPTCHA for auth0_v2 flows
Browse files Browse the repository at this point in the history
  • Loading branch information
TSLarson committed Jul 3, 2024
1 parent 70c1872 commit 3da3c71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/__tests__/field/captcha/third_party_captcha.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ describe('ThirdPartyCaptcha', () => {

const { onChange } = wrapper.props;
expect(onChange.mock.calls).toHaveLength(1);
expect(onChange.mock.calls[0][0]).toBe('BYPASS_CAPTCHA');
});
});

Expand Down
9 changes: 5 additions & 4 deletions src/field/captcha/third_party_captcha.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export class ThirdPartyCaptcha extends React.Component {
this.props.onChange(value);
this.props.onErrored();
});
};
};
}

getRenderParams() {
Expand Down Expand Up @@ -166,16 +166,17 @@ export class ThirdPartyCaptcha extends React.Component {
retryCount: prevState.retryCount + 1
}));
} else {
//
// similar implementation to ARKOSE_PROVIDER failOpen
this.changeHandler('BYPASS_CAPTCHA');
this.changeHandler();
}
return true;
}
};
}
return renderParams;
}

injectCaptchaScript(callback = noop) {
const { provider, hl, clientSubdomain, sitekey } = this.props;
const callbackName = `${providerDomPrefix(provider)}Callback_${Math.floor(Math.random() * 1000001)}`;
Expand Down Expand Up @@ -260,7 +261,7 @@ export class ThirdPartyCaptcha extends React.Component {

reset() {
const provider = getCaptchaProvider(this.props.provider);
if (this.props.provider === FRIENDLY_CAPTCHA_PROVIDER) {
if (this.props.provider === FRIENDLY_CAPTCHA_PROVIDER) {
if (this.widgetInstance) {
this.widgetInstance.reset();
}
Expand Down

0 comments on commit 3da3c71

Please sign in to comment.