From d0c525738e15416c81b660415bdceb59d64efc87 Mon Sep 17 00:00:00 2001 From: Jyotirmoy Bandyopadhayaya Date: Fri, 6 Feb 2026 19:53:29 +0530 Subject: [PATCH 1/3] feat: Add OneTouchEmailVerificationWithToken method and update ReCaptchaBodyModel properties - Introduced OneTouchEmailVerificationWithToken method to verify the token and retrieve the access token in a single call. - Updated ReCaptchaBodyModel properties to ignore null values during JSON serialization. --- .../Api/Authentication/OneTouchLoginApi.cs | 33 +++++++++++++++++++ .../RequestModels/ReCaptchaBodyModel.cs | 6 ++-- 2 files changed, 36 insertions(+), 3 deletions(-) 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/Models/RequestModels/ReCaptchaBodyModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/ReCaptchaBodyModel.cs index 3943615..83b6b8f 100644 --- a/Source/LoginRadiusSDK.V2/Models/RequestModels/ReCaptchaBodyModel.cs +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/ReCaptchaBodyModel.cs @@ -18,19 +18,19 @@ 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")] + [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;} } From cab3119f9427d8834111cc6650fc941ee228b12e Mon Sep 17 00:00:00 2001 From: Jyotirmoy Bandyopadhayaya Date: Fri, 6 Feb 2026 19:57:10 +0530 Subject: [PATCH 2/3] bump: release 11.8.0 --- CHANGELOG.md | 12 ++++++++++++ Source/LoginRadiusSDK.V2/LoginRadiusSDK.V2.csproj | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13d43a7..86a9ba4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ +# 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. + +## 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/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 From 97620346a4e26443ac5a81da88f763ec2b20566a Mon Sep 17 00:00:00 2001 From: Jyotirmoy Bandyopadhayaya Date: Wed, 25 Feb 2026 06:34:56 +0530 Subject: [PATCH 3/3] chore: Added missing property to --- CHANGELOG.md | 1 + .../Models/RequestModels/ReCaptchaBodyModel.cs | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86a9ba4..006087d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ## 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 diff --git a/Source/LoginRadiusSDK.V2/Models/RequestModels/ReCaptchaBodyModel.cs b/Source/LoginRadiusSDK.V2/Models/RequestModels/ReCaptchaBodyModel.cs index 83b6b8f..2ca01e3 100644 --- a/Source/LoginRadiusSDK.V2/Models/RequestModels/ReCaptchaBodyModel.cs +++ b/Source/LoginRadiusSDK.V2/Models/RequestModels/ReCaptchaBodyModel.cs @@ -24,6 +24,12 @@ public class ReCaptchaBodyModel /// /// the value of the user's random string retrieved from the QQ captcha /// + /// + /// 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;}