-
-
Notifications
You must be signed in to change notification settings - Fork 541
fix: reCaptcha cannot be loaded in China #7352
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
Since China's firewall blocks google.com, use recaptcha.net to avoid Chinese visitors not being able to load recaptcha
COMPARE TO
|
Name | Diff |
---|---|
packages/core/src/middleware/koa-security-headers.ts | 📈 +6 Bytes |
packages/experience/src/Providers/CaptchaContextProvider/utiles.ts | 📈 +3 Bytes |
packages/experience/src/Providers/CaptchaContextProvider/utils.ts | 📈 +3 Bytes |
Maybe we can add a new configuration field, such as “reCAPTCHA endpoint” or “reCAPTCHA domain,” instead of replacing it globally. |
Thank you for the PR. I think it is good! However, we might need to use |
Yes, you're right—I've updated the PR to use www.recaptcha.net instead. |
In that case, I recommend defaulting to www.recaptcha.net since many websites using Logto may not be aware that www.google.com is inaccessible in certain countries and regions—this could result in most Logto reCAPTCHAs failing to load for users in China. Additionally, Google provides another endpoint: recaptcha.google.cn, which could also be added to the list as an alternative option. |
@KarlLee830 we are working on this internally and will get back to you soon |
@KarlLee830 Hi, after discussion, we’ve decided to add a new optional field called “reCAPTCHA domain”, allowing users to specify their own domain if needed. By default, this will be set to |
Summary
Since China's firewall blocks google.com, use recaptcha.net to avoid Chinese visitors not being able to load recaptcha
fix: #7351
Source: https://developers.google.com/recaptcha/docs/faq#can-i-use-recaptcha-globally
Testing
Checklist
.changeset