Skip to content

Conversation

@wangsijie
Copy link
Contributor

fixed #7351

Summary

support reCaptcha domain customization, users can change to recaptcha.net.

Testing

截屏2025-12-04 下午2 59 25

Checklist

  • .changeset
  • unit tests
  • integration tests
  • necessary TSDoc comments

Copilot AI review requested due to automatic review settings December 4, 2025 07:05
@github-actions github-actions bot added the feature Cool stuff label Dec 4, 2025
@github-actions
Copy link

github-actions bot commented Dec 4, 2025

COMPARE TO master

Total Size Diff ⚠️ 📈 +13.25 KB

Diff by File
Name Diff
.changeset/early-lions-invent.md 📈 +275 Bytes
.changeset/witty-cars-end.md 📈 +519 Bytes
packages/console/src/pages/CaptchaDetails/CaptchaContent/index.tsx 📈 +89 Bytes
packages/console/src/pages/Security/Captcha/CaptchaFormFields/index.module.scss 📈 +73 Bytes
packages/console/src/pages/Security/Captcha/CaptchaFormFields/index.tsx 📈 +1.78 KB
packages/console/src/pages/Security/Captcha/CreateCaptchaForm/constants.ts 📈 +328 Bytes
packages/console/src/pages/Security/Captcha/CreateCaptchaForm/types.ts 📈 +46 Bytes
packages/console/src/pages/Security/Captcha/Guide/index.tsx 📈 +128 Bytes
packages/console/src/pages/Security/Captcha/types.tsx 📈 +117 Bytes
packages/core/src/libraries/sign-in-experience/index.ts 📈 +300 Bytes
packages/core/src/middleware/koa-security-headers.ts 📈 +199 Bytes
packages/core/src/routes/experience/classes/libraries/captcha-validator.ts 📈 +353 Bytes
packages/experience/src/Providers/CaptchaContextProvider/index.tsx 📈 +964 Bytes
packages/experience/src/Providers/CaptchaContextProvider/utils.ts 📈 +361 Bytes
packages/experience/src/containers/CaptchaBox/index.tsx 📈 +227 Bytes
packages/experience/src/include.d/global.d.ts 📈 +279 Bytes
packages/phrases/src/locales/ar/translation/admin-console/security.ts 📈 +441 Bytes
packages/phrases/src/locales/de/translation/admin-console/security.ts 📈 +422 Bytes
packages/phrases/src/locales/en/translation/admin-console/security.ts 📈 +365 Bytes
packages/phrases/src/locales/es/translation/admin-console/security.ts 📈 +414 Bytes
packages/phrases/src/locales/fr/translation/admin-console/security.ts 📈 +406 Bytes
packages/phrases/src/locales/it/translation/admin-console/security.ts 📈 +427 Bytes
packages/phrases/src/locales/ja/translation/admin-console/security.ts 📈 +454 Bytes
packages/phrases/src/locales/ko/translation/admin-console/security.ts 📈 +408 Bytes
packages/phrases/src/locales/pl-pl/translation/admin-console/security.ts 📈 +376 Bytes
packages/phrases/src/locales/pt-br/translation/admin-console/security.ts 📈 +400 Bytes
packages/phrases/src/locales/pt-pt/translation/admin-console/security.ts 📈 +397 Bytes
packages/phrases/src/locales/ru/translation/admin-console/security.ts 📈 +530 Bytes
packages/phrases/src/locales/th/translation/admin-console/security.ts 📈 +604 Bytes
packages/phrases/src/locales/tr-tr/translation/admin-console/security.ts 📈 +398 Bytes
packages/phrases/src/locales/zh-cn/translation/admin-console/security.ts 📈 +358 Bytes
packages/phrases/src/locales/zh-hk/translation/admin-console/security.ts 📈 +358 Bytes
packages/phrases/src/locales/zh-tw/translation/admin-console/security.ts 📈 +358 Bytes
packages/schemas/src/foundations/jsonb-types/captcha.ts 📈 +184 Bytes
packages/schemas/src/types/sign-in-experience.ts 📈 +185 Bytes

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for reCAPTCHA domain customization, allowing users to configure a custom domain (e.g., recaptcha.net) instead of using the default www.google.com domain for reCAPTCHA Enterprise.

  • Adds optional domain field to reCAPTCHA configuration schemas and types
  • Updates the experience package to use the custom domain when loading reCAPTCHA scripts
  • Adds translations for the new domain field across 18 locales
  • Updates CSP headers to allow additional reCAPTCHA-related domains

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/schemas/src/types/sign-in-experience.ts Adds optional domain field to captcha configuration type and guard
packages/schemas/src/foundations/jsonb-types/captcha.ts Adds optional domain field to reCAPTCHA Enterprise config schema
packages/experience/src/Providers/CaptchaContextProvider/utils.ts Updates script URL generation to use custom domain if provided
packages/experience/src/Providers/CaptchaContextProvider/index.tsx Adds debug console.log statements (should be removed)
packages/core/src/libraries/sign-in-experience/index.ts Includes domain in public captcha config when present
packages/core/src/middleware/koa-security-headers.ts Updates CSP to allow recaptcha.net and gstatic.cn domains
packages/console/src/pages/Security/Captcha/* Adds domain field to captcha configuration form
packages/phrases/src/locales/*/translation/admin-console/security.ts Adds translations for domain field label and placeholder in 18 locales
.changeset/early-lions-invent.md Documents the feature addition

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions bot added size/l and removed size/s labels Dec 8, 2025
@wangsijie wangsijie enabled auto-merge (squash) December 8, 2025 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

feature request: google.com/recaptcha can't open in China

3 participants