Skip to content

Conversation

dbrant
Copy link
Member

@dbrant dbrant commented Sep 22, 2025

@dbrant dbrant added the WIP Work in progress label Sep 22, 2025
HCaptchaConfig.builder()
.siteKey("f1f21d64-6384-4114-b7d0-d9d23e203b4a")
.theme(if (WikipediaApp.instance.currentTheme.isDark) HCaptchaTheme.DARK else HCaptchaTheme.LIGHT)
.host("meta.wikimedia.org")
Copy link

Choose a reason for hiding this comment

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

We can leave this line unset

Copy link
Member Author

Choose a reason for hiding this comment

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

The WebView popped up by the hCaptcha SDK requires a base URL that matches our content-security-policy, otherwise the iframe inside the WebView will refuse to load the hcaptcha content.

.endpoint("https://hcaptcha.wikimedia.org")
.assethost("https://assets-hcaptcha.wikimedia.org")
.imghost("https://imgs-hcaptcha.wikimedia.org")
.reportapi("https://report-hcaptcha.wikimedia.org")
Copy link
Member Author

Choose a reason for hiding this comment

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

(todo: all the above parameters will be served up via our new remote configuration endpoint)

@dbrant dbrant changed the base branch from main to hCaptchaPre September 24, 2025 13:48
Base automatically changed from hCaptchaPre to main September 24, 2025 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Work in progress
Development

Successfully merging this pull request may close these issues.

2 participants