-
-
Notifications
You must be signed in to change notification settings - Fork 733
HCaptcha support. #5953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
HCaptcha support. #5953
Conversation
HCaptchaConfig.builder() | ||
.siteKey("f1f21d64-6384-4114-b7d0-d9d23e203b4a") | ||
.theme(if (WikipediaApp.instance.currentTheme.isDark) HCaptchaTheme.DARK else HCaptchaTheme.LIGHT) | ||
.host("meta.wikimedia.org") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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)
https://phabricator.wikimedia.org/T379190