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;