michaelvs97 / AspNetCore.ReCaptcha

Google ReCAPTCHA v2/v3 Library for .NET Core 3.x/5.x
https://www.nuget.org/packages/AspNetCore.ReCaptcha/
MIT License
73 stars 20 forks source link

v2 invisible callback options #67

Closed thomasonk closed 1 month ago

thomasonk commented 5 months ago

Can the callback options for error and expired be included for v2 invisible? They appear to only be included for V2. They appear to be valid for v2 invisible as well as v2 checkbox.

From RecaptchaTagHelper.cs ReCaptchaVersion.V2Invisible => ReCaptchaGenerator.ReCaptchaV2Invisible(settings.RecaptchaBaseUrl, settings.SiteKey, Text, ClassName, Language, Callback, Badge), ReCaptchaVersion.V3 => ReCaptchaGenerator.ReCaptchaV3(settings.RecaptchaBaseUrl, settings.SiteKey, Action, Language, Callback, ReCaptchaGenerator.GenerateId(ViewContext), Nonce), => ReCaptchaGenerator.ReCaptchaV2(settings.RecaptchaBaseUrl, settings.SiteKey, Size, Theme, Language, Callback, ErrorCallback, ExpiredCallback_, AutoTheme, Nonce),

sleeuwen commented 1 month ago

Hi @thomasonk ,

Sorry for the late response, I didn't get a notification of this issue. I double checked and the callbacks are indeed valid for the V2 invisible version. I've created a PR to add this: #69.