From 9e2aaa5925532d55c626426f13cf23ff740a6f8d Mon Sep 17 00:00:00 2001 From: Will Smith Date: Wed, 4 Oct 2023 17:17:23 +0100 Subject: [PATCH] add client metadata to init auth call. --- .../CognitoUserAuthentication.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Amazon.Extensions.CognitoAuthentication/CognitoUserAuthentication.cs b/src/Amazon.Extensions.CognitoAuthentication/CognitoUserAuthentication.cs index b876b31..1b16a9e 100644 --- a/src/Amazon.Extensions.CognitoAuthentication/CognitoUserAuthentication.cs +++ b/src/Amazon.Extensions.CognitoAuthentication/CognitoUserAuthentication.cs @@ -63,6 +63,11 @@ public virtual async Task StartWithSrpAuthAsync(InitiateSrpAut Tuple tupleAa = AuthenticationHelper.CreateAaTuple(); InitiateAuthRequest initiateRequest = CreateSrpAuthRequest(tupleAa); + if (srpRequest.ClientMetadata != null) + { + initiateRequest.ClientMetadata = new Dictionary(srpRequest.ClientMetadata); + } + if (srpRequest.IsCustomAuthFlow) { initiateRequest.AuthFlow = AuthFlowType.CUSTOM_AUTH;