Add support for ReCaptcha in addition to HCaptcha (#372)

* Bump YamlDotNet from 11.2.1 to 12.0.0

Bumps [YamlDotNet](https://github.com/aaubry/YamlDotNet) from 11.2.1 to 12.0.0.
- [Release notes](https://github.com/aaubry/YamlDotNet/releases)
- [Commits](https://github.com/aaubry/YamlDotNet/compare/v11.2.1...v12.0.0)

---
updated-dependencies:
- dependency-name: YamlDotNet
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add support for ReCaptcha in addition to HCaptcha

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
Jayden 2022-07-25 18:38:10 -04:00 committed by GitHub
commit 9c5c5b5798
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 57 additions and 13 deletions

View file

@ -1,6 +1,17 @@
@using LBPUnion.ProjectLighthouse.Configuration
@if (ServerConfiguration.Instance.Captcha.CaptchaEnabled)
{
<div class="h-captcha" data-sitekey="@ServerConfiguration.Instance.Captcha.SiteKey"></div>
<script src="https://js.hcaptcha.com/1/api.js" async defer></script>
@switch (ServerConfiguration.Instance.Captcha.Type)
{
case CaptchaType.HCaptcha:
<div class="h-captcha" data-sitekey="@ServerConfiguration.Instance.Captcha.SiteKey"></div>
<script src="https://js.hcaptcha.com/1/api.js" async defer></script>
break;
case CaptchaType.ReCaptcha:
<div class="g-recaptcha" data-sitekey="@ServerConfiguration.Instance.Captcha.SiteKey"></div>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
break;
default:
throw new ArgumentOutOfRangeException();
}
}