Skip to content

Commit

Permalink
Fix Arkose missing from captcha error check
Browse files Browse the repository at this point in the history
  • Loading branch information
srijonsaha committed Apr 25, 2024
1 parent 20a8ecb commit 744bd59
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/connection/captcha.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export function showMissingCaptcha(m, id, isPasswordless = false, isPasswordRese
captchaConfig.get('provider') === 'recaptcha_enterprise' ||
captchaConfig.get('provider') === 'hcaptcha' ||
captchaConfig.get('provider') === 'auth0_v2' ||
captchaConfig.get('provider') === 'friendly_captcha'
captchaConfig.get('provider') === 'friendly_captcha' ||
captchaConfig.get('provider') === 'arkose'
) ? 'invalid_recaptcha' : 'invalid_captcha';

const errorMessage = i18n.html(m, ['error', 'login', captchaError]);
Expand Down
3 changes: 2 additions & 1 deletion src/connection/passwordless/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ function getErrorMessage(m, id, error) {
captchaConfig.get('provider') === 'recaptcha_enterprise' ||
captchaConfig.get('provider') === 'hcaptcha' ||
captchaConfig.get('provider') === 'auth0_v2' ||
captchaConfig.get('provider') === 'friendly_captcha'
captchaConfig.get('provider') === 'friendly_captcha' ||
captchaConfig.get('provider') === 'arkose'
) ? 'invalid_recaptcha' : 'invalid_captcha';
}

Expand Down
3 changes: 2 additions & 1 deletion src/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,8 @@ export function loginErrorMessage(m, error, type) {
currentCaptcha.get('provider') === 'recaptcha_enterprise' ||
currentCaptcha.get('provider') === 'hcaptcha' ||
currentCaptcha.get('provider') === 'auth0_v2' ||
currentCaptcha.get('provider') === 'friendly_captcha'
currentCaptcha.get('provider') === 'friendly_captcha' ||
currentCaptcha.get('provider') === 'arkose'
)) {
code = 'invalid_recaptcha';
}
Expand Down

0 comments on commit 744bd59

Please sign in to comment.