aws / aws-sdk-net-extensions-cognito

An extension library to assist in the Amazon Cognito User Pools authentication process
Apache License 2.0
102 stars 49 forks source link

Adding ClientMetadata to InitiateAuthRequest during StartWithSrpAuthAsync #135

Closed willsmith9182 closed 2 months ago

willsmith9182 commented 9 months ago

Issue #, if available:

Description of changes:

ClientMetadata is set on InitiateAuthRequest if present in InitiateSrpAuthRequest.

We use a pre-auth hook to do some captcha stuff in Cognito, we use ClientMetadata to send captcha values.

Without this change ClientMetadata values are not send as expected. In other Client libraries (like React) this data is currently forwarded.

My pre-auth hook is now happy, but I suspect this may want a deeper look into where else these values are not added when they should be.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

peterrsongg commented 2 months ago

@willsmith9182 Sorry for taking some time to get to this. I just took a look at our master branch and looks like this was already added to StartWithSrpAuthAsync about a year ago here - 855f2c6b96f0636a8f1def1f4bec85acc3aff459 Perhaps you're not on the latest version?

EDIT: sorry, i realize that this PR is slightly different. you can ignore my comment

willsmith9182 commented 1 month ago

Oooo shiny! Thank you!