diff --git a/CHANGELOG.md b/CHANGELOG.md index 13d43a7..006087d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,19 @@ +# Version 11.8.0 + +**Release Date:** February 06, 2026 + +## Enhancements + +- Made captcha fields explicitly optional in `ReCaptchaBodyModel` by adding `NullValueHandling.Ignore` to all captcha-related `JsonProperty` attributes, ensuring they are omitted from the request payload when not set. +- Added missing `h-captcha-response` property to `ReCaptchaBodyModel` + +## Newly Added APIs + +- `OneTouchEmailVerificationWithToken` - Convenience method that combines `OneTouchEmailVerification` and `OneTouchLoginPing` into a single call, returning the access token and user profile after email verification. + # Version 11.7.1 **Release Date:** November 06, 2025 diff --git a/Source/LoginRadiusSDK.V2/Api/Authentication/OneTouchLoginApi.cs b/Source/LoginRadiusSDK.V2/Api/Authentication/OneTouchLoginApi.cs index ce5dde9..ace8cf3 100644 --- a/Source/LoginRadiusSDK.V2/Api/Authentication/OneTouchLoginApi.cs +++ b/Source/LoginRadiusSDK.V2/Api/Authentication/OneTouchLoginApi.cs @@ -162,6 +162,39 @@ public async Task> OneTouchEmailVerification(strin return await ConfigureAndExecute(HttpMethod.GET, resourcePath, queryParameters, null); } /// + /// This API verifies the provided token for One Touch Login and retrieves the access token + /// by combining OneTouchEmailVerification and OneTouchLoginPing into a single call. + /// + /// Verification token received in the email + /// Unique string used in the One Touch Login request + /// The fields parameter filters the API response so that the response only includes a specific set of fields + /// Name of the welcome email template + /// Response containing User Profile Data and access token + + public async Task>> OneTouchEmailVerificationWithToken(string verificationToken, string clientGuid, + string fields = "", string welcomeEmailTemplate = null) + { + if (string.IsNullOrWhiteSpace(verificationToken)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(verificationToken)); + } + if (string.IsNullOrWhiteSpace(clientGuid)) + { + throw new ArgumentException(BaseConstants.ValidationMessage, nameof(clientGuid)); + } + + var verificationResponse = await OneTouchEmailVerification(verificationToken, welcomeEmailTemplate); + if (verificationResponse.Response != null && verificationResponse.Response.IsPosted) + { + return await OneTouchLoginPing(clientGuid, fields); + } + + return new ApiResponse> + { + RestException = verificationResponse.RestException + }; + } + /// /// This API is used to check if the One Touch Login link has been clicked or not. /// /// Unique string used in the Smart Login request diff --git a/Source/LoginRadiusSDK.V2/LoginRadiusSDK.V2.csproj b/Source/LoginRadiusSDK.V2/LoginRadiusSDK.V2.csproj index 9ad49e8..71b3466 100644 --- a/Source/LoginRadiusSDK.V2/LoginRadiusSDK.V2.csproj +++ b/Source/LoginRadiusSDK.V2/LoginRadiusSDK.V2.csproj @@ -25,7 +25,7 @@ Github LoginRadius Inc. True - 11.7.1 + 11.8.0 11.0.0.0 11.0.0.0 https://github.com/LoginRadius/dot-net-sdk diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/ReCaptchaBodyModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/ReCaptchaBodyModel.cs index 3943615..2ca01e3 100644 --- a/Source/LoginRadiusSDK.V2/Models/RequestModels/ReCaptchaBodyModel.cs +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/ReCaptchaBodyModel.cs @@ -18,19 +18,25 @@ public class ReCaptchaBodyModel /// /// The acknowledgement received by Google in Google recaptcha authorisation process. /// - [JsonProperty(PropertyName = "g-recaptcha-response")] + [JsonProperty(PropertyName = "g-recaptcha-response", NullValueHandling = NullValueHandling.Ignore)] public string G_recaptcha_response {get;set;} /// /// the value of the user's random string retrieved from the QQ captcha /// - [JsonProperty(PropertyName = "qq_captcha_randstr")] + /// + /// The acknowledgement received by hCaptcha in hCaptcha authorisation process. + /// + [JsonProperty(PropertyName = "h-captcha-response", NullValueHandling = NullValueHandling.Ignore)] + public string H_captcha_response {get;set;} + + [JsonProperty(PropertyName = "qq_captcha_randstr", NullValueHandling = NullValueHandling.Ignore)] public string Qq_captcha_randstr {get;set;} /// /// QQ Captcha ticket received from QQ in the QQ Captcha authorization process /// - [JsonProperty(PropertyName = "qq_captcha_ticket")] + [JsonProperty(PropertyName = "qq_captcha_ticket", NullValueHandling = NullValueHandling.Ignore)] public string Qq_captcha_ticket {get;set;} }