[TEN-173] Replace deprecated captcha endpoints with public api - #149
Merged
Merged
Conversation
yangwang-okta
approved these changes
Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
By submitting a PR to this repository, you agree to the terms within the Auth0 Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.
Description
Migrates
getBotDetectionSettinginanalyzer/tools/auth0.jsfrom the deprecated internal/api/anomaly/captchasendpoint to the two new public API endpoints:GET /api/v2/attack-protection/bot-detectionchallenge policies, allowlist, monitoring modeGET /api/v2/attack-protection/captchaactive captcha provider configThe legacy endpoint returned a single combined object; the public API splits this across two endpoints. Both are fetched in parallel and merged so downstream checks (
checkBotDetectionSetting) continue to receive the same unified shape with no changes required there.References
GET /api/anomaly/captchasin favor ofGET /api/v2/attack-protection/bot-detectionandGET /api/v2/attack-protection/captchaTesting
The merged response object has the same shape as the legacy internal endpoint returned, so all existing
checkBotDetectionSettinglogic is unaffected.Tested manually against a live tenant: both endpoints return 200 and the merged object contains the expected fields (
bot_detection_level,challenge_password_policy,challenge_passwordless_policy,challenge_password_reset_policy,allowlist,monitoring_mode_enabled,active_provider_id).Checklist