-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for .NET SDK V4 #156
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind this comment. Posted on the wrong PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GetUserPoolClientConfiguration
method in CognitoUserPool
is passing in collections into CognitoUserPoolClientConfiguration
which doesn't accept nulls. We should probably pass in empty collections if the the DescribeUserPoolClientAsync
returns back null collection.
I'm pretty sure the AuthParameters
at this point should not be null but I would still add a defensive check: https://github.com/aws/aws-sdk-net-extensions-cognito/blob/master/src/Amazon.Extensions.CognitoAuthentication/CognitoUserAuthentication.cs#L76C33-L76C47
The null checks for the challengeParameters
don't look complete in this method. UpdateUsernameAndSecretHash
Make sure the ChallengeResponses
property is not null at this point: https://github.com/aws/aws-sdk-net-extensions-cognito/blob/master/src/Amazon.Extensions.CognitoAuthentication/CognitoUserAuthentication.cs#L96
The ChallengeParameters
parameter needs some null checking: https://github.com/aws/aws-sdk-net-extensions-cognito/blob/master/src/Amazon.Extensions.CognitoAuthentication/CognitoUserAuthentication.cs#L175
Add some null checks on these collections. I'm not exactly sure where these collections are coming from but it might be from service responses.
https://github.com/aws/aws-sdk-net-extensions-cognito/blob/master/src/Amazon.Extensions.CognitoAuthentication/CognitoUser.cs#L774
https://github.com/aws/aws-sdk-net-extensions-cognito/blob/master/src/Amazon.Extensions.CognitoAuthentication/CognitoUser.cs#L792
https://github.com/aws/aws-sdk-net-extensions-cognito/blob/master/src/Amazon.Extensions.CognitoAuthentication/Util/CognitoAuthHelper.cs#L129
https://github.com/aws/aws-sdk-net-extensions-cognito/blob/master/src/Amazon.Extensions.CognitoAuthentication/CognitoDevice.cs#L317
Issue #, if available:
DOTNET-7759
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.