Skip to content

Commit

Permalink
[IAMRISK-3592] Remove BYPASS_CAPTCHA from auth0_V2 flows
Browse files Browse the repository at this point in the history
  • Loading branch information
TSLarson committed Jul 3, 2024
1 parent b960ee7 commit dd4dd0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/web-auth/captcha.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,6 @@ function handleCaptchaProvider(element, options, challenge, done) {
setValue();
globalForCaptchaProvider(challenge.provider).reset(widgetId);
retryCount++;
} else {
setValue('BYPASS_CAPTCHA');
}
return true;
};
Expand Down
5 changes: 2 additions & 3 deletions test/web-auth/captcha.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ describe('captcha rendering', function () {
}

if (provider === AUTH0_V2_CAPTCHA_PROVIDER) {
it('should remove script and set bypass token after more than 3 errors', function () {
it('should remove script after more than 3 errors', function () {
const input = element.querySelector('input[name="captcha"]');
input.value = '';
for (let i = 0; i < 4; i++) {
Expand All @@ -400,7 +400,6 @@ describe('captcha rendering', function () {
s.src.match('cloudflare')
)
).to.equal(undefined);
expect(input.value).to.equal('BYPASS_CAPTCHA');
});

it('should clear token on error before until the third attempt and set bypass token after more than 3 errors', function () {
Expand Down Expand Up @@ -1787,4 +1786,4 @@ describe('password reset captcha rendering', function () {
});
});
});
});
});

0 comments on commit dd4dd0a

Please sign in to comment.