Works correctly in production server, but in local development environment, siteverify always returns a low score, causing validation to fail with error message: ** Verification failed, score below threshold**
I have added localhost in the domain list on the google reCAPTCHA key page
5 Answer(s)
-
0
Google reCAPTCHA v3 scores can be lower in local development environments, even if "localhost" is added to the allowed domains. This is a known behavior and is not specific to ABP. Google’s scoring algorithm may treat local traffic as less trustworthy, especially if requests are automated or lack real user interaction.
In production, real user activity and proper domain validation typically result in higher scores. For local development, you can consider lowering the score threshold in your ABP reCAPTCHA configuration to allow testing, but be sure to restore the recommended threshold for production.
To adjust the threshold in ABP, set the
AbpReCaptchaOptions.ScoreThreshold
to a lower value in your development environment:
Configure<AbpReCaptchaOptions>(options => { options.ScoreThreshold = 0.1f; // Lower for local testing });
Always use your actual site key and secret, and ensure you are not using test keys in production.
For more details on enabling and configuring reCAPTCHA in ABP, see the official support answer:
- https://abp.io/support/questions/489
Google’s official documentation:
- https://www.google.com/recaptcha/about/
- https://www.google.com/recaptcha/admin
Sources:
- https://abp.io/support/questions/489
- https://www.google.com/recaptcha/about/
- https://www.google.com/recaptcha/admin
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
-
0
ok, but AbpReCaptchaOptions could not be found
-
0
hi What is your reCAPTCHA mode? V2 V3? What is your
VerifyBaseUrl
?Can you test your reCAPTCHA by https://github.com/maliming/reCAPTCHA/tree/master/demo/reCAPTCHA.Demo
Thanks.
-
0
what's VerifyBaseUrl? I am using v3 and do we need to set up the Site key and Site secret for each tenant? it's working in production, but it doesn't work in my local
-
0