1 Answer
- Newest
- Most votes
- Most comments
0
I managed to find my way around this and am posting this response for anyone who has the same problems:
There are a few things wrong with the code listed:
- First, credentials need to be passed through when constructing the AmazonCognitoIdentityProviderClient (idClient). Otherwise the request instance hangs and the following error occurs: AmazonServiceException: Unable to get IAM security credentials from EC2 Instance Metadata Service
- The SRP_A value is a special value and needs code to comupte it (see Secure Remote Password on wiki). The C# code I found that works for this is here: https://github.com/aws/aws-sdk-net-extensions-cognito/tree/master/src/Amazon.Extensions.CognitoAuthentication/Util You will need all the scripts in the util folder.
- The call for InitiateAuth must be tied to something - in this case: Amazon.CognitoIdentityProvider.Model.InitiateAuthResponse
The correct code (as far as I can tell at this moment) is:
This returns the PASSWORD_VERIFIER challange as part of "response".
There may be issues with this I have yet to run into as I am still in the process on integrating - so please be careful.
answered a year ago
Relevant content
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago