-
-
Notifications
You must be signed in to change notification settings - Fork 661
feat(core,experience): support recaptcha domain customization #8040
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: master
Are you sure you want to change the base?
Conversation
COMPARE TO
|
| 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 |
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.
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
domainfield 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.
fixed #7351
Summary
support reCaptcha domain customization, users can change to
recaptcha.net.Testing
Checklist
.changeset